graypegg / chromatism

:rainbow: A simple set of utility functions for colours.
1.78k stars 37 forks source link

Minification is cool #4

Closed FiberJW closed 7 years ago

FiberJW commented 7 years ago

Hey there,

If you could run your dist file through a minifier like uglify or something, it would be great for those sensitive about performance. There are a few 20+ line sections of blank lines and space that could be saved. Right now your dist file is almost twice as big as tinycolor's. 'Twas just a tip if you're trying to bring more users to depend on your library.

Thanks for the great work

graypegg commented 7 years ago

Thanks! Planning on adding this, just switched over to Rollup from Webpack, which introduces some issues with ES6 modules. I've pushed an initial attempt for now, I should have a moment tonight to compress stuff a bit more, brings the build to 18k though!

graypegg commented 7 years ago

Been going thru stuff looking for any duplicated code, or something that could be simplified. Can't find much so I think 18k is the minimum for now, though I don't think +28% on tinycolor is TOO awful. Don't want to sacrifice functionality. Thanks again for the issue!