Skip to content

Commit 1288bca

Browse files
committed
build: add analyze script
1 parent 84ab6f9 commit 1288bca

File tree

3 files changed

+145
-3
lines changed

3 files changed

+145
-3
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,12 @@ Live application: [angular-authentication.netlify.app](https://angular-authentic
4444
### Useful Commands
4545

4646
- `npm start` - starts a dev server of Angular app
47-
- `npm run build` - builds full prod build
47+
- `npm run build:prod` - builds full prod build
4848
- `npm run lint` - linting source code of this project
4949
- `npm run format:check` - runs prettier to check for formatting errors
5050
- `npm run format:write` - runs prettier to format whole code base
5151
- `npm run release` - runs standard-version to create new release
52+
- `npm run analyze` - runs Webpack Bundle Analyzer to examine chunk files
5253

5354
## Features
5455

package-lock.json

Lines changed: 138 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@
66
"ng": "ng",
77
"start": "ng serve",
88
"build": "NODE_ENV=production ng build",
9+
"build:prod": "NODE_ENV=production ng build --configuration production",
910
"watch": "ng build --watch --configuration development",
1011
"test": "ng test",
1112
"lint": "ng lint",
1213
"format:check": "prettier --list-different \"src/**/*.{ts,js,json,css,scss,html}\"",
1314
"format:write": "prettier --write \"src/**/*.{ts,js,json,css,scss,html}\"",
14-
"release": "standard-version"
15+
"release": "standard-version",
16+
"analyze": "npm run build:prod -- --stats-json --named-chunks && webpack-bundle-analyzer ./dist/angular-authentication/stats.json"
1517
},
1618
"private": true,
1719
"dependencies": {
@@ -71,6 +73,7 @@
7173
"lint-staged": "^12.1.2",
7274
"prettier": "^2.4.1",
7375
"standard-version": "^9.3.2",
74-
"typescript": "~4.4.4"
76+
"typescript": "~4.4.4",
77+
"webpack-bundle-analyzer": "^4.5.0"
7578
}
7679
}

0 commit comments

Comments
 (0)