Skip to content

Commit

Permalink
make npm scripts work under Windows
Browse files Browse the repository at this point in the history
* Use mkdirp from npm as a cross-platform solution for mkdir -p
* fix quotes of argument to uglify
* not sure whether specifying the path node_modules/mocha/bin/ is an
  antipattern (some comments by npm authors claim so) but istanbul does
  not seem to take the PATH into account
  • Loading branch information
bergus committed Jun 23, 2016
1 parent 6e4fe0f commit a18de4f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions package.json
Expand Up @@ -25,11 +25,11 @@
"async"
],
"scripts": {
"build-dist": "mkdir -p dist && rollup src/main.js | babel -m umd --module-id creed -o dist/creed.js --loose es6.classes",
"build": "npm run build-dist && uglifyjs -c 'warnings=false' -m -o dist/creed.min.js -- dist/creed.js",
"build-dist": "mkdirp dist && rollup src/main.js | babel -m umd --module-id creed -o dist/creed.js --loose es6.classes",
"build": "npm run build-dist && uglifyjs -c \"warnings=false\" -m -o dist/creed.min.js -- dist/creed.js",
"preversion": "npm run build",
"test-aplus": "promises-aplus-tests test/aplus.js --reporter dot",
"test-main": "istanbul cover --root src _mocha -- --reporter dot",
"test-main": "istanbul cover --root src node_modules/mocha/bin/_mocha -- --reporter dot",
"check-coverage": "istanbul check-coverage --statements 100 --branches 100 --lines 100 --functions 100 coverage/coverage*.json",
"lint": "jsinspect src && eslint src",
"test": "npm run lint && npm run build && npm run test-main && npm run check-coverage && npm run test-aplus"
Expand All @@ -45,6 +45,7 @@
"eslint-plugin-standard": "^1.3.2",
"istanbul": "^0.4.0",
"jsinspect": "^0.7.0",
"mkdirp": "^0.5.1",
"mocha": "^2.3.0",
"promises-aplus-tests": "^2.1.1",
"rollup": "^0.26.2",
Expand Down

0 comments on commit a18de4f

Please sign in to comment.