Skip to content

Instantly share code, notes, and snippets.

@kulakowka
Last active November 16, 2015 11:41
Show Gist options
  • Save kulakowka/8394d853fc96218c1667 to your computer and use it in GitHub Desktop.
Save kulakowka/8394d853fc96218c1667 to your computer and use it in GitHub Desktop.

Usage

  • npm run production - Build task that generates minified scripts for production
  • npm run precommit - Run the unit tests,, and generate a minified script
  • npm run clean - Remove the dist folder
  • npm run eslint:source - Lint the source
  • npm run eslint:common - Lint the unit tests shared by Karma and Mocha
  • npm run eslint:server - Lint the unit tests for server
  • npm run eslint:browser - Lint the unit tests for browser
  • npm run clean - Remove the coverage report and the dist folder
  • npm run test - Runs unit tests for both server and the browser
  • npm run test:browser - Runs the unit tests for browser / client
  • npm run test:server - Runs the unit tests on the server
  • npm run watch:server - Run all unit tests for server & watch files for changes
  • npm run watch:browser - Run all unit tests for browser & watch files for changes
  • npm run karma:firefox - Run all unit tests with Karma & Firefox
  • npm run karma:chrome - Run all unit tests with Karma & Chrome
  • npm run karma:ie - Run all unit tests with Karma & Internet Explorer
  • npm run packages - List installed packages
  • npm run package:purge - Remove all dependencies
  • npm run package:reinstall - Reinstall all dependencies
  • npm run package:updates - shows a list over dependencies with a higher version number then the current one - if any
  • npm run package:upgrade - Automaticly upgrade all dependencies and update package.json
  • npm run asset-server - starts a asset server with hot module replacement (WDS) on port 8080
{
"scripts": {
"precommit": "npm test && npm run build",
"clean": "rimraf dist",
"production": "npm run clean && set NODE_ENV=production && webpack --config ./config/webpack/webpack.production.config.js --progress --profile --colors",
"test": "npm run test:server && npm run test:browser",
"test:server": "mocha --opts config/mocha.opts",
"test:browser": "./node_modules/.bin/karma start --single-run",
"watch:server": "npm run test:server -- --watch",
"watch:browser": "./node_modules/.bin/karma start --auto-watch --no-single-run",
"eslint:source": "eslint ./src/**/*.js",
"eslint:common": "eslint ./test/**/*.common.js",
"eslint:server": "eslint ./test/**/*.server.js",
"eslint:browser": "eslint ./test/**/*.browser.js",
"karma:firefox": "./node_modules/.bin/karma start --browsers=Firefox",
"karma:chrome": "./node_modules/.bin/karma start --browsers=Chrome",
"karma:ie": "./node_modules/.bin/karma start --browsers=IE",
"karma:all": "./node_modules/.bin/karma start --browsers=PhantomJS,Chrome,Firefox",
"packages": "npm list --depth=0",
"package:purge": "rm -rf node_modules",
"package:reinstall": "npm run package:purge && npm install",
"package:updates": "./node_modules/.bin/ncu",
"package:upgrade": "npm run package:updates -u",
"asset-server": "node config/webpack/webpack.hot.assets.config"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment