frintjs/frint

Travis-CI: print gzip sizes of dists after successful builds

Open

#270 aperta il 20 ago 2017

Vedi su GitHub
 (0 commenti) (0 reazioni) (0 assegnatari)JavaScript (37 fork)batch import
good first issuehelp wanted

Metriche repository

Star
 (746 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Currently

We have a Makefile command like this that shows the minified and gzip sizes of our dists:

$ npm run dist
$ make list-dists
original 	 gzipped 	 file
--- 		 --- 		 ---
15.2K 		 3.4K 		 ./packages/frint-compat/dist/frint-compat.min.js
2.6K 		 1.0K 		 ./packages/frint-model/dist/frint-model.min.js
11.8K 		 2.8K 		 ./packages/frint-react/dist/frint-react.min.js
8.6K 		 2.0K 		 ./packages/frint-router-react/dist/frint-router-react.min.js
25.7K 		 7.7K 		 ./packages/frint-router/dist/frint-router.min.js
6.5K 		 2.2K 		 ./packages/frint-store/dist/frint-store.min.js
11.1K 		 2.9K 		 ./packages/frint/dist/frint.min.js

Print dist sizes on Travis-CI

It would be good for historical reasons, to print this info during Travis-CI builds too via .travis.yml file by adding this:

after_success:
  - '...other commands'
  - 'npm run dist'
  - 'make list-dists'

What needs to be done

It was tried before in #261, but since our make list-dists command uses bc, it didn't work properly on Travis-CI. So a workaround needs to be found for that.

Guida contributor