harp icon indicating copy to clipboard operation
harp copied to clipboard

Minify JavaScript

Open TrevorSayre opened this issue 9 years ago • 9 comments

Currently Harp will minify your CoffeeScript, but if you write pure JavaScript files, then you're out of luck. I believe the same is true for Jade/HTML, LESS/CSS, etc. but I haven't tested. It would be nice to be able to pass an option to minify, or at least know an accepted process for Harp to minify your standard file types instead of relying on Grunt/Gulp/etc.

Since harp-minify is a thing, and it works just fine at minifying HTML/CSS/JavaScript, the above described behavior feels odd.

TrevorSayre avatar Dec 08 '15 15:12 TrevorSayre

@TrevorSayre This doesn't really answer your question, but my solution to this has been to use Gulp.js https://github.com/ianrose/storysettings/blob/master/gulpfile.js#L43-L47

ianrose avatar Dec 08 '15 18:12 ianrose

@ianrose I also use gulp to bring in browser-sync for dev and minify at compile time, but it would make sense for harp to do this itself. I posted this more as a suggestion than a question. Thank you for sharing, though!

TrevorSayre avatar Dec 08 '15 19:12 TrevorSayre

@TrevorSayre gotcha, agreed :+1:

ianrose avatar Dec 08 '15 19:12 ianrose

+1

cfjedimaster avatar Dec 08 '15 20:12 cfjedimaster

This is especially true for me with vendor files that I have in the project unminified but would like minified in production.

jeremyhaile avatar Jan 08 '16 14:01 jeremyhaile

+1

eltuctuc avatar Jan 27 '16 08:01 eltuctuc

:+1: this is an absolute necessity

theofidry avatar Feb 14 '16 20:02 theofidry

👍

lroot avatar Jan 04 '17 02:01 lroot

👍

kinduff avatar Mar 04 '18 23:03 kinduff