Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.

Commit 84c7ce8

Browse files
jvalkealcppwfs
authored andcommitted
Add webpack bunder analyzer
- To use run commands: - ng build --prod --stats-json - npm run bundle-report - Should open browser in http://127.0.0.1:8888/ Added documentation to readme
1 parent 40d9802 commit 84c7ce8

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

ui/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,13 @@ Use [https://github.com/tjunnone/npm-check-updates](https://github.com/tjunnone/
103103
[Node.js]: http://nodejs.org/
104104
[npm]: https://www.npmjs.com/
105105
[Protractor]: https://github.com/angular/protractor
106+
107+
## Project Analytics
108+
109+
### Web Pack Bundle Analyzer
110+
Produces analysis report on the project webpack bundles.
111+
112+
$ ng build --prod --stats-json
113+
$ npm run bundle-report
114+
115+
You can view the results via your browser at: http://127.0.0.1:8888/

ui/package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"e2e": "ng e2e",
1212
"install": "napa pivotal-cf/pivotal-ui:pivotal-ui-git-clone",
1313
"doc": "./node_modules/.bin/compodoc -p tsconfig.json -n \"Spring Cloud Data Flow Dashboard Documentation\"",
14-
"mavenbuild": "node ./node_modules/@angular/cli/bin/ng test --code-coverage true --watch false --browsers PhantomJS && node ./node_modules/@angular/cli/bin/ng build --prod --output-path ./../src/main/resources/public/dashboard --base-href /dashboard/"
14+
"mavenbuild": "node ./node_modules/@angular/cli/bin/ng test --code-coverage true --watch false --browsers PhantomJS && node ./node_modules/@angular/cli/bin/ng build --prod --output-path ./../src/main/resources/public/dashboard --base-href /dashboard/",
15+
"bundle-report": "webpack-bundle-analyzer dist/stats.json"
1516
},
1617
"private": true,
1718
"dependencies": {
@@ -45,6 +46,7 @@
4546
"@angular/cli": "1.3.0",
4647
"@angular/compiler-cli": "^4.2.4",
4748
"@angular/language-service": "^4.2.4",
49+
"@compodoc/compodoc": "^1.0.0-beta.13",
4850
"@types/d3": "^4.10.0",
4951
"@types/jasmine": "~2.5.53",
5052
"@types/jasminewd2": "~2.0.2",
@@ -58,13 +60,13 @@
5860
"karma-coverage-istanbul-reporter": "^1.2.1",
5961
"karma-jasmine": "~1.1.0",
6062
"karma-jasmine-html-reporter": "^0.2.2",
63+
"karma-phantomjs-launcher": "^1.0.4",
64+
"napa": "^2.3.0",
6165
"protractor": "~5.1.2",
6266
"ts-node": "~3.2.0",
6367
"tslint": "~5.3.2",
6468
"typescript": "~2.4.2",
65-
"karma-phantomjs-launcher": "^1.0.4",
66-
"napa": "^2.3.0",
67-
"@compodoc/compodoc": "^1.0.0-beta.13"
69+
"webpack-bundle-analyzer": "^2.9.0"
6870
},
6971
"napa-config": {
7072
"cache": false

0 commit comments

Comments
 (0)