Concatenation of multiple files
- Advertisement -
Managing file order dependencies:
Linting, static analysis, and style checking:
Automating running of unit test cases:
When developing, nobody wants to do a minor change in their CSS/JS files and then go to the browser, hit refresh to see the changes. This is a time-consuming process even though it might seem like a small thing. Live reloading refreshes the browser automatically for you whenever you save files in your development environment.
- Server side tools: ASP.Net and Rails provide a solution to the problem of concatenation, minification and bundling. These are helpful, but they do not solve other issues mentioned above.
- Task Runners: Gulp and Grunt are the most used task runners to automate tasks. Task runners are generic tools which can be used in your build pipeline to solve above mentioned issues. And they can also automate other tasks such as automating test cases execution, static analysis of code, re-running the server whenever the code changes, installing specific things, etc. You can then use a module system or manage file order dependencies using wiredep or use a framework in which file order does not matter. You can even use NPM as a build tool if you want to. For a comparison amongst which to choose, I wrote a post before explaining the scenario of Gulp vs Grunt vs NPM and why I chose Gulp as the task runner.
- Dependency Managers and Module Loaders: There are tools like Browserify, which can help you manage your dependencies efficiently. There is another module loader called Webpack, which can be considered as a specialized task runner that process input files to output files. JSPM is also the new kid in town. I haven’t read much about it but with HTTP 2 becoming a reality, many people are backing it. If you have something to say about it, I would love to hear them in comments below.
very useful thanks
Thank you for commenting.
Thanks for commenting!