yagerGames Posted May 1, 2017 Share Posted May 1, 2017 Anyone know of a simple code minifier? I can't get Uglify.JS working in Webstorm... It's a pain in the neck. No instructions anywhere about how to install it and set it up on windows. Link to comment Share on other sites More sharing options...
mattstyles Posted May 1, 2017 Share Posted May 1, 2017 UglifyJS is the defacto, as such there are multiple ways to include it into your project, its available as an 'executable' (via node) so any tooling can wrap it without worry, I'd suggest using the terminal to run your build process properly rather than rely on editor plugins. If you're set on editor plugins look for another uglify one, there will be a couple, maybe you're just using a dud one. Closure Compiler used to be very popular, you might find a plugin that works better with that. Closure can be very powerful, powerful enough to break your code sometimes if you max the minification. As you're on Windows I suggest using a bash emulator, Github ships a good bash shell that can be used with Windows. I say this because whilst most tooling you use in the JS world will run via node you might find plenty of stuff that expects a bash (or bourne) shell to work (which is unix) and you'll have more success getting stuff to run if you go that route. I'm a Mac or a Linux so maybe someone with more Windows experience could provide an alternative? Link to comment Share on other sites More sharing options...
bruno_ Posted May 1, 2017 Share Posted May 1, 2017 I use visual studio community with web essentials extension. Bundling and minification of files is very simple with that. Link to comment Share on other sites More sharing options...
yagerGames Posted May 2, 2017 Author Share Posted May 2, 2017 It's easier to just login to my Linode, install Uglify.JS dependencies, then Uglify.JS, and then minify the files command line... Than the impossible task of getting it done on windows. Good lord! Link to comment Share on other sites More sharing options...
mattstyles Posted May 2, 2017 Share Posted May 2, 2017 44 minutes ago, yagerGames said: Than the impossible task of getting it done on windows. Good lord! Ha ha, maybe I'm underestimating the sheer horror! Git bash used to work well when I was developing a port for windows store but, that was a looong time ago now. Link to comment Share on other sites More sharing options...
Recommended Posts