Build automation is a big deal for every developer, because it helps focus on developing websites and web apps rather than performing repetitive tasks repeatedly like minifying stylesheets, compressing images, code linting, unit testing, packages update, dependencies management, etc…
In this article I will be showing the importance of Task Runners, Package Managers and web scaffolding tools.
The Task Runner job:
Grunt, Cake, Gulp and Broccoli are all JS task runners. However Grunt JS & Gulp JS are the most popular, and they both run on top of NodeJS. Both allows you to easily spawn a development server, watch for file changes, compile your code/templates, deploy code — pretty much do anything with simple commands.
They differ in terms of configuration style, ease of setup, availability of plugins, running speed, etc. However best configuration and speed goes for Gulp. And best community and plugins goes for Grunt.
The Package Manager job:
Package manager or dependency manager is a collection of software tools to automate the process of installing, upgrading, configuring, and removing software packages for a project in a consistent manner.
Bower is one of the best package manager for the front-end packages and assets.
Bower and npm:
Bower and Composer:
Composer is the best package manager for the back-end development in the PHP world. No need to repeat but Bower is the unique package manager for the front-end development.
So if you are a PHP developer you will most likely be using Composer and Bower together with your next project.
This can be done by adding the bower command (bower install) to the (post-install-cmd) or/and (post-update-cmd) inside the composer.json file.
The Web Scaffolding tools job:
Combining Package manager and JS Task Runner “with even more tools” in your project will definitely boost your front-end development. But combining them might wast some time, that’s why scaffolding tools exist.
Slush and Yeoman are the most powerful web scaffolding tools today. They are both client-side development stack, consisting of tools and frameworks intended to help developers quickly build high quality web applications and prescribe best practices.
Yeoman provides a generator ecosystem. A generator is basically a plugin that can be run with the
yo command to scaffold complete projects or useful parts.
The Yeoman workflow is comprised of three core tools:
This workflow is a robust and opinionated client-side stack, comprising tools and frameworks that can help developers quickly build beautiful web applications. It takes care of providing everything needed to get started without any of the normal headaches associated with a manual setup.
Slush is the new scaffolding tool on the block, and, in the true spirit of Gulp, it is a streaming scaffolding system. Slush offers a CLI that will find all of your globally installed “Slush generators”.
Slush generator is a Yeoman-like project generator built with Gulp. It uses a Slushfile instead of a Gulpfile. With Slush you don’t have to learn how to write both generators and taskrunner files, just learn Gulp and you’re good with both.
I really love the movement towards choosing individual packages for use in a project. As a developer, your life is made so much better when you can easily pick and choose the components you want to use in any given project.
Stay up to date and follow me on Twitter Mahmoud Zalt