Concat scripts in order with Gulp

Say, for example, you are building a project on Backbone or whatever and you need to load scripts in a certain order, e.g. underscore.js needs to be loaded before backbone.js. How do I get it to concat the scripts so that they’re in order? // JS concat, strip debugging and minify gulp.task(‘scripts’, function() { gulp.src([‘./source/js/*.js’, … Read more

gulp command not found – error after installing gulp

I’ve installed gulp both globally and locally using npm install gulp npm install gulp -g npm install gulp-util npm install gulp-util -g When try to run gulp i get ‘gulp’ is not recognized as an internal or external command, operable program or batch file. Running npm list gulp (or -g), I [email protected] with the location … Read more

Excluding files/directories from Gulp task

I have a gulp rjs task that concatenates and uglifies all my custom .JS files (any non vendor libraries). What i am trying to do, is exclude some files/directories from this task (controllers and directives). Heres my tree: – application – resources – js main.js – vendor – jquery – modernzr – angular – controllers … Read more

Expected linebreaks to be ‘LF’ but found ‘CRLF’ linebreak-style

When using eslint in the gulp project i have encountered a problem with error like this Expected linebreaks to be ‘LF’ but found ‘CRLF’ linebreak-style and I am using Windows environment for the running gulp and the entire error log is given below Kiran (master *) Lesson 4 $ gulp Using gulpfile c:\Users\Sai\Desktop\web-build-tools\4\ gulpfile.js Starting … Read more

Try reinstalling `node-sass` on node 0.12?

I would like to use google web starter kit. I installed node.js v0.12.0, node-sass & gulp. And then ran: $ sudo npm install When I typed gulp serve then got this error: Using gulpfile ~/web-starter-kit/gulpfile.js Starting ‘styles’… ‘styles’ errored after 93 ms Error: `libsass` bindings not found. Try reinstalling `node-sass`? at getBinding I reinstalled node … Read more

Gulp error: The following tasks did not complete: Did you forget to signal async completion?

I have the following gulpfile.js, which I’m executing via the command line gulp message: var gulp = require(‘gulp’); gulp.task(‘message’, function() { console.log(“HTTP Server Started”); }); I’m getting the following error message: [14:14:41] Using gulpfile ~\Documents\node\first\gulpfile.js [14:14:41] Starting ‘message’… HTTP Server Started [14:14:41] The following tasks did not complete: message [14:14:41] Did you forget to signal … Read more