diff --git a/README.md b/README.md index 18f2920..85aaab4 100644 --- a/README.md +++ b/README.md @@ -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/). diff --git a/generators/app/templates/template/README.md b/generators/app/templates/template/README.md index 45fbdad..26a6cbc 100644 --- a/generators/app/templates/template/README.md +++ b/generators/app/templates/template/README.md @@ -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 -``` \ No newline at end of file +# add tests, make changes, pass tests ... then [ctrl+c] +npm run publish +``` diff --git a/generators/app/templates/template/package.json b/generators/app/templates/template/package.json index 4eef755..125302d 100644 --- a/generators/app/templates/template/package.json +++ b/generators/app/templates/template/package.json @@ -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",