Skip to content

Instantly share code, notes, and snippets.

@hatemhosny
Created September 25, 2017 16:18
Show Gist options
  • Save hatemhosny/b3ae5a718c997813599bfa50167dcd87 to your computer and use it in GitHub Desktop.
Save hatemhosny/b3ae5a718c997813599bfa50167dcd87 to your computer and use it in GitHub Desktop.
NPM scripts
"scripts": {
"start": "npm-run-all lint ng:serve",
"build": "npm-run-all lint ng:build",
"build:prod": "npm-run-all lint ng:build:prod",
"build:stag": "npm-run-all lint ng:build:stag",
"build:gh-pages": "npm-run-all lint ng:build:gh-pages copy:404 git:add git:commit",
"ng:build:gh-pages": "ng build --prod --base-href /ng2-material/",
"copy:404": "copy .\\dist\\index.html .\\dist\\404.html",
"copy:200": "copy .\\dist\\index.html .\\dist\\200.html",
"git:add": "git add .",
"git:commit": "git commit -m deploy",
"push:gh-pages": "git subtree push --prefix dist origin gh-pages",
"deploy:gh-pages": "npm-run-all build:gh-pages push:gh-pages",
"surge": "(cd dist && surge --domain myapp.surge.sh)",
"deploy:surge": "npm-run-all build:prod copy:200 copy:404 surge",
"dploy:dev": "dploy dev",
"dploy:stag": "dploy stag",
"dploy:prod": "dploy prod",
"deploy:dev": "npm-run-all build:prod copy:404 git:add git:commit dploy:dev",
"deploy:stag": "npm-run-all build:prod copy:404 git:add git:commit dploy:stag",
"deploy:prod": "npm-run-all build:prod copy:404 git:add git:commit dploy:prod",
"ng:serve": "ng serve",
"ng:serve:prod": "ng serve --prod --aot",
"ng:serve:stag": "ng serve --environment=stag --aot",
"ng:build": "ng build --aot",
"ng:build:prod": "ng build --prod --aot",
"ng:build:stag": "ng build --environment=stag --aot",
"localtunnel": "lt --port 4200 --subdomain myapp",
"share": "npm-run-all --parallel serve:prod localtunnel",
"lint": "tslint \"src/**/*.ts\"",
"test": "ng test",
"pree2e": "webdriver-manager update --standalone false --gecko false",
"e2e": "protractor",
"api": "npm-run-all json-schema-faker json-server",
"json-schema-faker": "generate-json api/schema.json api/db.json",
"json-server": "json-server --watch api/db.json",
"docs": "npm run compodoc",
"docs:serve": "npm run compodoc:serve",
"compodoc": "./node_modules/.bin/compodoc -p src/tsconfig.json -d docs",
"compodoc:serve": "./node_modules/.bin/compodoc -p src/tsconfig.json -d docs -s"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment