Skip to content

Commit

Permalink
Refactor npm scripts for changes in npm
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Jan 10, 2015
1 parent 2e9382f commit 46edeb5
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 26 deletions.
46 changes: 22 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,36 +42,34 @@
"unicode-7.0.0": "^0.1.0"
},
"scripts": {
"test-lib": "node_modules/.bin/_mocha --reporter spec --check-leaks -u exports test/index.js",
"test-browser": "node_modules/.bin/_mocha --reporter spec --check-leaks -u exports -t 10000 test/browser.js",
"test-browser": "_mocha --check-leaks -t 10000 test/browser.js",
"test-cli": "bash ./test/cli.sh",
"test-coveralls": "node_modules/.bin/istanbul cover node_modules/.bin/_mocha --report lcovonly -- --reporter spec --check-leaks -u exports test/index.js",
"test-travis": "npm run test-cli && npm run test-browser && npm run test-coveralls",
"test-lib": "_mocha --check-leaks test/index.js",
"test-coveralls": "istanbul cover _mocha --report lcovonly -- --check-leaks test/index.js",
"test-coverage": "istanbul cover _mocha -- -- test/index.js",
"test-travis": "npm run test-coveralls && npm run test-browser && npm run test-cli",
"test": "npm run test-lib && npm run test-browser && npm run test-cli",
"coverage": "node_modules/.bin/istanbul cover node_modules/.bin/_mocha -- -- test/index.js",
"lint-api": "node_modules/.bin/eslint index.js lib/franc.js lib/expressions.js",
"lint-cli": "node_modules/.bin/eslint cli.js",
"lint-script": "node_modules/.bin/eslint script/build-fixtures.js script/build-support.js script/build-languages.js --rule 'dot-notation: false'",
"lint-test": "node_modules/.bin/eslint test/index.js test/browser.js --env mocha",
"lint-benchmark": "node_modules/.bin/eslint benchmark.js --global suite,bench,set",
"lint-style": "node_modules/.bin/jscs index.js lib/franc.js cli.js script/build-fixtures.js script/build-support.js script/build-languages.js benchmark.js test/index.js test/browser.js --reporter=inline",
"lint": "npm run lint-api && npm run lint-cli && npm run lint-script && npm run lint-test && npm run lint-benchmark && npm run lint-style",
"make": "npm run lint && npm run coverage",
"lint-api": "eslint index.js lib/franc.js lib/expressions.js",
"lint-cli": "eslint cli.js",
"lint-script": "eslint --rule dot-notation:false script/build-fixtures.js script/build-support.js script/build-languages.js",
"lint-test": "eslint --env mocha test/index.js test/browser.js",
"lint-benchmark": "eslint --global suite,bench,set benchmark.js",
"lint-style": "jscs --reporter inline index.js lib/franc.js cli.js script/build-fixtures.js script/build-support.js script/build-languages.js benchmark.js test/index.js test/browser.js",
"lint": "npm run lint-api && npm run lint-benchmark && npm run lint-cli && npm run lint-script && npm run lint-test && npm run lint-style",
"make": "npm run lint && npm run test-coverage",
"install-benchmark": "npm install guesslanguage languagedetect vac",
"benchmark": "node_modules/.bin/matcha benchmark.js",
"build-browser-bundle-top": "THRESHOLD=8000000 npm run build-languages && node_modules/.bin/browserify lib/franc.js --standalone franc --outfile dist/franc.js",
"build-browser-bundle-most": "npm run build-languages && node_modules/.bin/browserify lib/franc.js --standalone franc --outfile dist/franc-most.js",
"build-browser-bundle-all": "THRESHOLD=-1 npm run build-languages && node_modules/.bin/browserify lib/franc.js --standalone franc --outfile dist/franc-all.js",
"build-browser-bundle": "npm run build-browser-bundle-top && npm run build-browser-bundle-all && npm run build-browser-bundle-most",
"build-browser-uglify-top": "node_modules/.bin/esmangle dist/franc.js -o dist/franc.js",
"build-browser-uglify-most": "node_modules/.bin/esmangle dist/franc-most.js -o dist/franc-most.js",
"build-browser-uglify-all": "node_modules/.bin/esmangle dist/franc-all.js -o dist/franc-all.js",
"build-browser-uglify": "npm run build-browser-uglify-top && npm run build-browser-uglify-most && npm run build-browser-uglify-all",
"build-browser": "npm run build-browser-bundle && npm run build-browser-uglify",
"benchmark": "matcha benchmark.js",
"build-languages": "node script/build-languages.js",
"build-fixtures": "node script/build-fixtures.js",
"build-support": "node script/build-support.js",
"build": "npm run build-browser && npm run build-fixtures && npm run build-support",
"prebundle": "export THRESHOLD=8000000 && npm run build-languages && browserify lib/franc.js --standalone franc --outfile dist/franc.js",
"bundle": "export THRESHOLD=1000000 && npm run build-languages && browserify lib/franc.js --standalone franc --outfile dist/franc-most.js",
"postbundle": "export THRESHOLD=-1 && npm run build-languages && browserify lib/franc.js --standalone franc --outfile dist/franc-all.js",
"premangle": "esmangle dist/franc.js -o dist/franc.js",
"mangle": "esmangle dist/franc-most.js -o dist/franc-most.js",
"postmangle": "esmangle dist/franc-all.js -o dist/franc-all.js",
"build-browser": "npm run bundle && npm run mangle",
"build": "npm run build-browser && export THRESHOLD=1000000 && npm run build-languages && npm run build-fixtures && npm run build-support",
"prepublish": "npm run build"
}
}
5 changes: 3 additions & 2 deletions script/build-languages.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ topLanguages = [];
* Can be passed in through an environment variable,
* for example when executing the following:
*
* ```sh
* THRESHOLD=99999 npm run build
* ```bash
* export THRESHOLD=99999
* npm run build
* ```
*/

Expand Down

0 comments on commit 46edeb5

Please sign in to comment.