Skip to content

Commit 566b1fc

Browse files
committed
[DEV-682] Create script command that allow to disable angular cache when making build with CI
1 parent e38689d commit 566b1fc

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

angular.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,10 @@
281281
"defaultProject": "dspace-angular",
282282
"cli": {
283283
"analytics": false,
284-
"defaultCollection": "@angular-eslint/schematics"
284+
"defaultCollection": "@angular-eslint/schematics",
285+
"cache": {
286+
"enabled": true,
287+
"environment": "local"
288+
}
285289
}
286290
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@
66
"config:watch": "nodemon",
77
"test:rest": "ts-node --project ./tsconfig.ts-node.json scripts/test-rest.ts",
88
"start": "yarn run start:prod",
9-
"start:dev": "nodemon --exec \"cross-env NODE_ENV=development yarn run serve\"",
9+
"start:dev": "ng config cli.cache.environment local && nodemon --exec \"cross-env NODE_ENV=development yarn run serve\"",
1010
"start:prod": "yarn run build:prod && cross-env NODE_ENV=production yarn run serve:ssr",
1111
"start:mirador:prod": "yarn run build:mirador && yarn run start:prod",
1212
"serve": "npm run ng-high-memory -- serve -c development",
1313
"serve:ssr": "node dist/server/main",
1414
"analyze": "webpack-bundle-analyzer dist/browser/stats.json",
1515
"build": "ng build -c development",
1616
"build:stats": "ng build --stats-json",
17+
"build:ci": "ng config cli.cache.environment ci && yarn run build:ssr",
1718
"build:prod": "yarn run build:ssr",
1819
"build:ssr": "npm run ng-high-memory -- build --configuration production && ng run dspace-angular:server:production",
1920
"ng-high-memory": "node --max_old_space_size=8192 node_modules/@angular/cli/bin/ng",

0 commit comments

Comments
 (0)