Skip to content

Commit

Permalink
Merge pull request #33 from typings/simplify
Browse files Browse the repository at this point in the history
Simplify commands
  • Loading branch information
unional committed Mar 27, 2016
2 parents 920d06a + d9d2356 commit 26102b7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 22 deletions.
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,12 @@
* [ ] Mocha
* [ ] Jasmine
* [ ] npm commands
* [x] build: Build typings for testing
* [x] watch: Build typings for testing automatically
* [x] test: Run tests
* [ ] source-test: Run tests copied form source
* [ ] lint: Run tslint
* [x] test-all: Run both `test` and `source-test`
* [x] tdd: Watch both typings and tests, and run `build` and `test` when changed
* [x] tdd-all: Watch both typings and tests, and run `build`, `test-all` when changed
* [ ] publish: Create PR to [`typings/registry`](https://github.com/typings/registry)
* individual commands
* [x] build: Build typings for testing
* [x] lint: Run tslint
* [x] test: Run tests

## Installation
First, install [Yeoman](http://yeoman.io) and generator-typings using [npm](https://www.npmjs.com/).
Expand Down
11 changes: 4 additions & 7 deletions generators/app/templates/template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,11 @@ The type definition for [`<%- sourcePackageName %>`](<%- sourcePackageUrl %>)
## Contributing

```sh
# Install modules
# Fork this repo
npm install

# Build
npm run build
npm run watch

# Test
npm test
npm run tdd
```
# add tests, make changes, pass tests ... then [ctrl+c]
npm run publish
```
15 changes: 7 additions & 8 deletions generators/app/templates/template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,19 @@
"private": true,
"scripts": {
"build": "typings bundle<%- ambient %> -o out",
"test": "ts-node test/test.ts",
"source-test": "<%- sourceTest %>",
"test-all": "npm test && npm run source-test",
"watch": "onchange '**/*.d.ts' -i -e 'out/**' -- npm run build",
"tdd": "onchange '**/*.ts' -i -e 'out/**' -- npm run build+test",
"tdd-all": "onchange '**/*.ts' -i -e 'out/**' -- npm run build+test-all",
"build+test": "npm run build && npm test",
"build+test-all": "npm run build && npm run test-all",
"lint": "tslint \"**/*.ts\" -e \"source/**\" -e \"out/**\" -e \"node_modules/**\" -e \"typings/**\"",
"test": "cd test && ts-node ../node_modules/blue-tape/bin/blue-tape \"**/*.ts\" | tap-spec && cd .. && <%- sourceTest %>",
"watch": "onchange \"**/*.ts\" -i -e \"out/**\" -- npm -s run build+test",
"publish": "npm -s run lint+build+test && echo please publish to typings/registry",
"build+test": "npm run build && npm run test",
"lint+build+test": "npm run lint && npm run build+test",
"prepublish": "typings install"
},
"devDependencies": {
"blue-tape": "^0.2.0",
"is-callable": "1.1.3",
"onchange": "^2.2.0",
"tap-spec": "^4.1.1",
"ts-node": "^0.7.0",
"tslint": "git+https://github.com/unional/tslint.git",
"tslint-config-typings": "^0.1.2",
Expand Down

0 comments on commit 26102b7

Please sign in to comment.