Skip to content

Commit d5d81b7

Browse files
committed
Adding setup and update
These tasks are helpful for managing the project.
1 parent 4537948 commit d5d81b7

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,16 @@ The `npm run` supports the following commands.
2525
- **compile** Compiles the TypeScript.
2626
- **coveralls** Sends code coverage information to Coveralls.
2727
- **lint** Runs `tslint` on all of the files.
28+
- **setup** Removes `node_modules` and `typings` and then runs `npm install` and
29+
`npm run typings`
2830
- **pretest** Automatically run before `test`. Compiles and modifies the
2931
compiled JavaScript for sourcemap support and coverage.
3032
- **test** Runs mocha with istanbul code coverage. Set `$MOCHA_REPORTER` to
3133
override which reporter is used in tests.
3234
- **posttest** Automatically run after `test`. Checks the code coverage and will
3335
fail if the code coverage is not sufficient. Also runs `lint`.
3436
- **typings** Installs the type definitions.
37+
- **update** Merges from origin master and then runs `npm run setup`.
3538

3639
## Contributing
3740

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@
1818
"precompile": "npm run clean",
1919
"compile": "find src test typings -name \"*.ts\" | xargs tsc --declaration --module commonjs --target es5 --noImplicitAny --outDir build",
2020
"coveralls": "cat ./coverage/lcov.info | coveralls",
21-
"init": "rm -rf node_modules typings && npm install && npm run typings",
2221
"lint": "find src test -name \"*.ts\" | sed 's/^/--file=/g' | xargs tslint",
22+
"setup": "rm -rf node_modules typings && npm install && npm run typings",
2323
"pretest": "npm run compile -- --sourceMap && find build -type f -name *.js -exec sed -i .bak -e '1s/^var __extends/\\/\\* istanbul ignore next \\*\\/\rvar __extends/; 1s/^/require(\"source-map-support\").install();\r/' {} \\;",
2424
"test": "istanbul cover _mocha -- --reporter ${MOCHA_REPORTER-nyan} --slow 10 --ui tdd --recursive build/**/*_test.js",
2525
"posttest": "npm run lint && istanbul check-coverage --statements 100 --branches 100 --functions 100 --lines 100",
26-
"typings": "tsd reinstall && tsd rebundle"
26+
"typings": "tsd reinstall && tsd rebundle",
27+
"update": "git fetch && git merge origin master && npm run setup"
2728
},
2829
"repository": {
2930
"type": "git",

0 commit comments

Comments
 (0)