So, I’m working on a big project where there is a need for a tone of JS, so I don’t want to write everything in one file, just because it gets confusing working on it, and with the time will be even harder to keep track with everything.
So my plan is to split in multiple files and folders like.
js/home/register.js
js/home/login.js
But I want everything compiled in one files, I will like to use something like SASS has @import for styles, or something to take the files and compile automatically in one.
What’s the best tool out here that you recommend guys?
You can use any of several tools for this, including
cat(on *nix systems) orcopy(on Windows systems).It probably makes sense to use a compiling / compressing / minifying / packing tool like the Closure Compiler, YUI Compressor,
jsmin, or packer3. But which one you use is really up to you, the needs of your project, etc.