Last active
January 11, 2025 10:49
Revisions
-
nodesocket revised this gist
Aug 2, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -24,7 +24,7 @@ Runs the `serve` and `watch` tasks. Usually this is the only task you will need ## Notifications Popup task notifications *(similar to growl)* are provided by `gulp-notify`. On error notifications *(either failed to compile less or JavaScript)* also play a frog sound on OS X. ## Help -
nodesocket revised this gist
Aug 1, 2014 . 2 changed files with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ ## The perfect gulp.js file ## Tasks This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ { "name": "perfect-gulp", "description": "The perfect gulp.js file", "author": "Commando.io", "contributors": [ { -
nodesocket revised this gist
Aug 1, 2014 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ { "name": "perfect-gulp", "description": "The perfect Gulp.js file", "author": "Commando.io", "contributors": [ { "name": "Commando.io", -
nodesocket revised this gist
Aug 1, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ ## The perfect Gulp.js file ## Tasks -
nodesocket revised this gist
Aug 1, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,7 +22,7 @@ Automatically runs `uglify-js` and `less` when relivant files are **created**, * Runs the `serve` and `watch` tasks. Usually this is the only task you will need to run. ## Notifications Popup task notifications *(similar to growl)* are provided by `gulp-notify`. On error notifications *(either failed to compile less or JavaScript)* also play a frog sound on OS X.g -
nodesocket revised this gist
Aug 1, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,7 +22,7 @@ Automatically runs `uglify-js` and `less` when relivant files are **created**, * Runs the `serve` and `watch` tasks. Usually this is the only task you will need to run. ## Growl like notifications Popup task notifications *(similar to growl)* are provided by `gulp-notify`. On error notifications *(either failed to compile less or JavaScript)* also play a frog sound on OS X.g -
nodesocket revised this gist
Aug 1, 2014 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -23,6 +23,7 @@ gulp.task('uglify-js', 'Concat, Ng-Annotate, Uglify JavaScript into a single app gulp.src(['client/js/libraries/**/*.js', 'client/js/source/**/*.js']) .pipe(concat('app')) .pipe(ngAnnotate()) .on('error', notify.onError("Error: <%= error.message %>")) .pipe(uglify()) .on('error', notify.onError("Error: <%= error.message %>")) .pipe(rename({ -
nodesocket revised this gist
Jul 31, 2014 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,6 +22,10 @@ Automatically runs `uglify-js` and `less` when relivant files are **created**, * Runs the `serve` and `watch` tasks. Usually this is the only task you will need to run. ## Notifications Popup task notifications *(similar to growl)* are provided by `gulp-notify`. On error notifications *(either failed to compile less or JavaScript)* also play a frog sound on OS X.g ## Help `gulp help` for help. -
nodesocket revised this gist
Jul 31, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -26,4 +26,4 @@ Runs the `serve` and `watch` tasks. Usually this is the only task you will need `gulp help` for help.  -
nodesocket revised this gist
Jul 31, 2014 . 3 changed files with 57 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ ## The perfect Gulp.js ## Tasks #### serve Runs a **connect** web server, serving files from `/client` on port `3000`. #### uglify-js Concatenates JavaScript files, runs them through ngAnnotate *(magic angular.js dependency injection)*, uglifies, and names the output file `app.min.js`. #### less Compiles **less** styles into a single `app.css`. #### watch Automatically runs `uglify-js` and `less` when relivant files are **created**, **deleted**, or **modified**. Also supports **live reloading** via a [Chrome Extension](https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei?hl=en). #### default Runs the `serve` and `watch` tasks. Usually this is the only task you will need to run. ## Help `gulp help` for help. [Screenshot](http://i.imgur.com/YRClqt3.png) This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,7 +15,7 @@ var gulp = require('gulp'), }); gulp.task('serve', 'A simple web server.', serve({ root: ['client'], port: 3000 })); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ { "name": "", "description": "", "author": "", "contributors": [ { "name": "Commando.io", "email": "[email protected]" } ], "version": "0.0.1", "dependencies": {}, "devDependencies": { "gulp": "^3.8.2", "gulp-concat": "^2.2.0", "gulp-help": "^0.1.8", "gulp-less": "^1.3.1", "gulp-livereload": "^2.1.0", "gulp-ng-annotate": "^0.2.0", "gulp-notify": "^1.4.0", "gulp-rename": "^1.2.0", "gulp-serve": "^0.2.0", "gulp-uglify": "^0.3.1", "gulp-watch": "^0.6.8", "moment": "^2.7.0" } } -
nodesocket created this gist
Jul 31, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,71 @@ var gulp = require('gulp'), watch = require('gulp-watch'), liveReload = require('gulp-livereload'), concat = require('gulp-concat'), ngAnnotate = require('gulp-ng-annotate'), uglify = require('gulp-uglify'), rename = require('gulp-rename'), moment = require('moment'), notify = require('gulp-notify'); less = require('gulp-less'); serve = require('gulp-serve'); require('gulp-help')(gulp, { description: 'Help listing.' }); gulp.task('serve', 'A simple web server.', serve({ root: ['client', 'client/views'], port: 3000 })); gulp.task('uglify-js', 'Concat, Ng-Annotate, Uglify JavaScript into a single app.min.js.', function() { gulp.src(['client/js/libraries/**/*.js', 'client/js/source/**/*.js']) .pipe(concat('app')) .pipe(ngAnnotate()) .pipe(uglify()) .on('error', notify.onError("Error: <%= error.message %>")) .pipe(rename({ extname: ".min.js" })) .pipe(gulp.dest('client/js')) .pipe(notify('Uglified JavaScript (' + moment().format('MMM Do h:mm:ss A') + ')')) .pipe(liveReload({ auto: false })); }); gulp.task('less', 'Compile less into a single app.css.', function() { gulp.src(['client/styles/bootstrap/bootstrap.less', 'client/styles/*.less']) .pipe(concat('app')) .pipe(less()) .on('error', notify.onError("Error: <%= error.message %>")) .pipe(gulp.dest('client/styles')) .pipe(notify('Compiled less (' + moment().format('MMM Do h:mm:ss A') + ')')) .pipe(liveReload({ auto: false })); }); gulp.task('watch', 'Watch for changes and live reloads Chrome. Requires the Chrome extension \'LiveReload\'.', function() { liveReload.listen(); watch({ glob: 'client/js/source/**/*.js' }, function() { gulp.start('uglify-js'); }); watch({ glob: 'client/styles/*.less', }, function() { gulp.start('less'); }); watch({ glob: 'client/views/**/*.html' }).pipe(liveReload({ auto: false })); }); gulp.task('default', ['watch', 'serve']);