wix-incubator / corvid-types

Type definitions for Corvid by Wix
MIT License
5 stars 3 forks source link

On CI always do production build #90

Closed yurynix closed 2 years ago

yurynix commented 2 years ago

This: https://unpkg.com/corvid-types@0.4.7/dist/fullCorvidTypesJSON.esm.chunk.js ends up as a development build, 300Kb larger than it could be if built in production mode.

➜  corvid-types git:(master) ✗ du -h dist/fullCorvidTypesJSON.esm.chunk.js
3.8M    dist/fullCorvidTypesJSON.esm.chunk.js

...
➜  corvid-types git:(master) ✗ du -h dist/fullCorvidTypesJSON.esm.chunk.js
3.5M    dist/fullCorvidTypesJSON.esm.chunk.js

In this PR I suggest checking the CI env variable to force production build, a better approach would be to use is-ci package, but not sure how are you with adding additional dependency ¯_(ツ)_/¯

Travis CI sets CI=true by default

yurynix commented 2 years ago

@nemni8 No idea where from I got the idea this project running on Travis, sorry about that 🙃 Github Actions also set CI=true so it should be fine.

nemni8 commented 2 years ago

cool. merging your pr :)