3

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

2
  • 1
    What have you tried so far? What is your setup? Gulp / Brunch / CodeKit - all the build tools will allow you to do this. Commented Jun 18, 2017 at 0:21
  • I actually do not use any build tools, that is what I am new to, I just push to heroku from git. Commented Jun 18, 2017 at 0:24

1 Answer 1

4

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! : )

Sign up to request clarification or add additional context in comments.

1 Comment

I agree, Gulp will take away the tedious tasks and can also push to Heroku after completing a build. i recommend following a tutorial on how to use Gulp for a better idea. Here's a random link from a Google Search: julienrenaux.fr/2014/05/25/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.