I'm enamoured with a build system
Jul. 27th, 2014 10:43 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Playing with Gulp.js, which is a node-based build system.
This is my build file so far.
And it basically monitors the file list (which is all of my js files), and whenever any of them changes it combines them into one master file, adding the Angular annotations as it goes.
So if you look at the source for the controllers here you'll see that they don't have the annotations that you need if you're going to minify things.
But if you look in the version that's produced (and is then referenced in the HTML) here it's got the annotations in it.
And it's easier for me to find the code I want to change because it's in multiple files - but the final version can be one, combined, minified version, so it's faster to download.
I don't have it minifying yet. That's for sometime later in the week :-> (and uglify looks like it does the job).
I think I'm going to find this _really_ useful.
This is my build file so far.
And it basically monitors the file list (which is all of my js files), and whenever any of them changes it combines them into one master file, adding the Angular annotations as it goes.
So if you look at the source for the controllers here you'll see that they don't have the annotations that you need if you're going to minify things.
But if you look in the version that's produced (and is then referenced in the HTML) here it's got the annotations in it.
And it's easier for me to find the code I want to change because it's in multiple files - but the final version can be one, combined, minified version, so it's faster to download.
I don't have it minifying yet. That's for sometime later in the week :-> (and uglify looks like it does the job).
I think I'm going to find this _really_ useful.