Gulpfile.js for vanilla AngularJS projects

Since I’ve learnt Angular, most of my front-end web applications are written in it. Its brilliant. Everything works fine, up to a point where your application has grown 10 times the size it was since you started it. At some point you’d want something to accelerate your delivery. That’s when gulp comes in.

Gulp is kinda like a build tool but for javascript based applications. It runs on Node.js and is available on npm. All you need to do is:

or if you are using a unix based application:

That gets you access to the gulp command line. Once you have gulp installed, you need to something that tells it what to do with your project. Unlike many other build tools, gulp favours code over configuration. This means that rather than writing XML or YAML files that define the tasks, you write code. This is what makes gulp unique.

So, here’s what I have. Below is my gulpfile.js that I use in most of my AngularJS projects: Continue reading