javascript – Automated tool to merge multiple style sheets (CSS) into 1 and to merge Scripts (JS) into 1 sheet

Question:

I searched the internet for ways to merge CSS Style Sheets and JS Script Sheets in an automated way, but I didn't get good results.

I have about 17 Style Sheets and 15 Scripts, if I do it manually I'll go "crazy" and it will take a long time.

Does anyone know of an online tool or software that allows me to do this in an automated way?

Ex: I send all the files (sheets) to the site and I download the file with the sheets already joined, or some software that does this in an automated way.

Answer:

I will give a simple answer, which in no way serves large projects, and solves compilation and reduction of files, but that I use in small projects.

See the example tree:

root
   js/
     - compilado.js
     src/
        - 01-core.js
        - 02-functions.js
        - 03-extra.js

To generate compilado.js :

cd js;
cat src/*.js > compilado.js

The same can be done with css

Scroll to Top