Lion789
Lion789

Reputation: 4482

How to minify multiple HTML / CSS files at once?

I know I can minify files and concatenate them one by one before production, but that sounds like a tedious way to do it.

Is there some way to minify all my files before pushing it to production?

I am using NodeJS, with JS, CSS, and html.

I found this not sure if there is a better way or the answer: https://github.com/srod/node-minify

Thanks

Upvotes: 3

Views: 540

Answers (1)

sheriffderek
sheriffderek

Reputation: 9043

You'll need to setup a build-tool or task-runner / or both.

If you are using Node (you know JavaScript) - but you are new to build tools, you may want to start with Gulp. The website should walk you through it. Webpack is pretty complex. I use Brunch and Broccoli and sometimes - when I need an easy to use GUI, CodeKit. There are lots of options. Learn Gulp and then you'll be in a good spot to think about other ways and their positives and negatives. Good Luck! : )

Upvotes: 4

Related Questions