diff --git a/.gitignore b/.gitignore index 375fa44b18..0e713600f8 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ npm-debug.log .idea *.ngfactory.ts *.css.shim.ts +*.scss.shim.ts .DS_Store diff --git a/package.json b/package.json index 3814a97740..d9f8546719 100644 --- a/package.json +++ b/package.json @@ -7,28 +7,43 @@ "url": "https://github.com/dspace/dspace-angular.git" }, "scripts": { - "watch": "webpack --watch", - "watch:dev": "npm run server & npm run watch & npm run sass:watch", - "clean:dist": "rimraf dist src/**/*.css", - "clean:ngc": "rimraf **/*.ngfactory.ts **/*.css.shim.ts", + "clean:log": "rimraf *.log*", + "clean:dist": "rimraf dist/*", + "clean:node": "rimraf node_modules/*", + "clean:ngc": "rimraf **/*.ngfactory.ts", + "clean:json": "rimraf *.records.json", + "clean:css": "rimraf **/*.css", + "clean:css:ts": "rimraf **/*.css.ts", + "clean:scss:ts": "rimraf **/*.scss.ts", + "clean:css:shim:ts": "rimraf **/*.css.shim.ts", + "clean:scss:shim:ts": "rimraf **/*.scss.shim.ts", + "clean:prod": "npm run clean:ngc && npm run clean:json && npm run clean:css && npm run clean:css:ts && npm run clean:scss:ts && npm run clean:css:shim:ts && npm run clean:scss:shim:ts", + "clean": "npm run clean:log && npm run clean:dist && npm run clean:prod && npm run clean:node", "sass": "node-sass src -o src --include-path node_modules --output-style compressed -q", "sass:watch": "node-sass -w src -o src --include-path node_modules --output-style compressed -q", "prebuild": "npm run clean:dist && npm run sass", "build": "webpack --progress", + "build:prod": "webpack --config webpack.prod.config.ts", "build:prod:ngc": "npm run clean:ngc && npm run ngc && npm run clean:dist && npm run build:prod", "build:prod:ngc:json": "npm run clean:ngc && npm run ngc && npm run clean:dist && npm run build:prod:json", - "build:prod": "webpack --config webpack.prod.config.ts", "build:prod:json": "webpack --config webpack.prod.config.ts --json | webpack-bundle-size-analyzer", "ngc": "ngc -p tsconfig.aot.json", - "prestart": "npm run build", - "server": "nodemon dist/server/index.js", - "debug:server": "node-nightly --inspect --debug-brk dist/server/index.js", + "prestart": "npm run sass && npm run build:prod:ngc:json", + "server": "node dist/server/index.js", + "server:debug": "nodemon --debug dist/server/index.js", "start": "npm run server", - "debug:start": "npm run build && npm run debug:server", + "start:dev": "npm run clean:prod && npm run build && npm run server", + "watch": "webpack -w & npm run sass:watch", + "watch:dev:server": "concurrently \"npm run server:debug\" \"npm run watch\"", + "watch:dev": "npm run clean:prod && npm run build && npm run watch:dev:server", + "watch:prod:server": "concurrently \"npm run server:debug\" \"npm run watch\"", + "watch:prod": "npm run build:prod:ngc:json && npm run watch:prod:server", "predebug": "npm run build", + "debug": "node --debug-brk dist/server/index.js", + "debug:server": "node-nightly --inspect --debug-brk dist/server/index.js", + "debug:start": "npm run build && npm run debug:server", "debug:build": "node-nightly --inspect --debug-brk node_modules/webpack/bin/webpack.js", "debug:build:prod": "node-nightly --inspect --debug-brk node_modules/webpack/bin/webpack.js --config webpack.prod.config.ts", - "debug": "node --debug-brk dist/server/index.js", "lint": "tslint \"src/**/*.ts\" || true" }, "dependencies": { @@ -82,6 +97,7 @@ "angular2-template-loader": "^0.6.0", "awesome-typescript-loader": "^2.2.4", "codelyzer": "2.0.0-beta.1", + "concurrently": "3.1.0", "cookie-parser": "^1.4.3", "copy-webpack-plugin": "~4.0.1", "express-interceptor": "^1.2.0",