Last active
October 15, 2018 18:05
-
-
Save justinmc/9149719 to your computer and use it in GitHub Desktop.
Revisions
-
justinmc revised this gist
Dec 14, 2014 . 1 changed file 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 @@ -38,9 +38,9 @@ gulp.task('scripts', ['clean'], function() { // Imagemin images and ouput them in dist gulp.task('imagemin', ['clean'], function() { gulp.src(paths.images, {cwd: bases.app}) .pipe(imagemin()) .pipe(gulp.dest(bases.dist + 'images/')); }); // Copy all other files to dist directly -
justinmc revised this gist
Dec 14, 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 @@ -12,7 +12,7 @@ var bases = { }; var paths = { scripts: ['scripts/**/*.js', '!scripts/libs/**/*.js'], libs: ['scripts/libs/jquery/dist/jquery.js', 'scripts/libs/underscore/underscore.js', 'scripts/backbone/backbone.js'], styles: ['styles/**/*.css'], html: ['index.html', '404.html'], -
justinmc revised this gist
Dec 14, 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 @@ -68,4 +68,4 @@ gulp.task('watch', function() { }); // Define the default task as a sequence of the above tasks gulp.task('default', ['clean', 'scripts', 'imagemin', 'copy']); -
justinmc revised this gist
Apr 13, 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 @@ -27,7 +27,7 @@ gulp.task('clean', function() { }); // Process scripts and concatenate them into one output file gulp.task('scripts', ['clean'], function() { gulp.src(paths.scripts, {cwd: bases.app}) .pipe(jshint()) .pipe(jshint.reporter('default')) @@ -37,14 +37,14 @@ gulp.task('scripts', function() { }); // Imagemin images and ouput them in dist gulp.task('imagemin', ['clean'], function() { gulp.src(paths.images) .pipe(imagemin()) .pipe(gulp.dest(bases.dist)); }); // Copy all other files to dist directly gulp.task('copy', ['clean'], function() { // Copy html gulp.src(paths.html, {cwd: bases.app}) .pipe(gulp.dest(bases.dist)); -
justinmc revised this gist
Feb 24, 2014 . 1 changed file with 34 additions and 34 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 @@ -7,65 +7,65 @@ var uglify = require('gulp-uglify'); var imagemin = require('gulp-imagemin'); var bases = { app: 'app/', dist: 'dist/', }; var paths = { scripts: ['scripts/**/*.js', '!scripts/libs/'], libs: ['scripts/libs/jquery/dist/jquery.js', 'scripts/libs/underscore/underscore.js', 'scripts/backbone/backbone.js'], styles: ['styles/**/*.css'], html: ['index.html', '404.html'], images: ['images/**/*.png'], extras: ['crossdomain.xml', 'humans.txt', 'manifest.appcache', 'robots.txt', 'favicon.ico'], }; // Delete the dist directory gulp.task('clean', function() { return gulp.src(bases.dist) .pipe(clean()); }); // Process scripts and concatenate them into one output file gulp.task('scripts', function() { gulp.src(paths.scripts, {cwd: bases.app}) .pipe(jshint()) .pipe(jshint.reporter('default')) .pipe(uglify()) .pipe(concat('app.min.js')) .pipe(gulp.dest(bases.dist + 'scripts/')); }); // Imagemin images and ouput them in dist gulp.task('imagemin', function() { gulp.src(paths.images) .pipe(imagemin()) .pipe(gulp.dest(bases.dist)); }); // Copy all other files to dist directly gulp.task('copy', function() { // Copy html gulp.src(paths.html, {cwd: bases.app}) .pipe(gulp.dest(bases.dist)); // Copy styles gulp.src(paths.styles, {cwd: bases.app}) .pipe(gulp.dest(bases.dist + 'styles')); // Copy lib scripts, maintaining the original directory structure gulp.src(paths.libs, {cwd: 'app/**'}) .pipe(gulp.dest(bases.dist)); // Copy extra html5bp files gulp.src(paths.extras, {cwd: bases.app}) .pipe(gulp.dest(bases.dist)); }); // A development task to run anytime a file changes gulp.task('watch', function() { gulp.watch('app/**/*', ['scripts', 'copy']); }); // Define the default task as a sequence of the above tasks gulp.task('default', ['clean', 'scripts', 'imagemin ', 'copy']); -
justinmc revised this gist
Feb 22, 2014 . 1 changed file with 4 additions and 4 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,13 +22,13 @@ var paths = { // Delete the dist directory gulp.task('clean', function() { gulp.src(bases.dist) .pipe(clean()); }); // Process scripts and concatenate them into one output file gulp.task('scripts', function() { gulp.src(paths.scripts, {cwd: bases.app}) .pipe(jshint()) .pipe(jshint.reporter('default')) .pipe(uglify()) @@ -38,7 +38,7 @@ gulp.task('scripts', function() { // Imagemin images and ouput them in dist gulp.task('imagemin', function() { gulp.src(paths.images) .pipe(imagemin()) .pipe(gulp.dest(bases.dist)); }); @@ -68,4 +68,4 @@ gulp.task('watch', function() { }); // Define the default task as a sequence of these tasks gulp.task('default', ['clean', 'scripts', 'imagemin', 'copy']); -
justinmc created this gist
Feb 22, 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'); var clean = require('gulp-clean'); var jshint = require('gulp-jshint'); var concat = require('gulp-concat'); var uglify = require('gulp-uglify'); var imagemin = require('gulp-imagemin'); var bases = { app: 'app/', dist: 'dist/', }; var paths = { scripts: ['scripts/**/*.js', '!scripts/libs/'], libs: ['scripts/libs/jquery/dist/jquery.js', 'scripts/libs/underscore/underscore.js', 'scripts/backbone/backbone.js'], styles: ['styles/**/*.css'], html: ['index.html', '404.html'], images: ['images/**/*.png'], extras: ['crossdomain.xml', 'humans.txt', 'manifest.appcache', 'robots.txt', 'favicon.ico'], }; // Delete the dist directory gulp.task('clean', function() { return gulp.src(bases.dist) .pipe(clean()); }); // Process scripts and concatenate them into one output file gulp.task('scripts', function() { return gulp.src(paths.scripts, {cwd: bases.app}) .pipe(jshint()) .pipe(jshint.reporter('default')) .pipe(uglify()) .pipe(concat('app.min.js')) .pipe(gulp.dest(bases.dist + 'scripts/')); }); // Imagemin images and ouput them in dist gulp.task('imagemin', function() { return gulp.src(paths.images) .pipe(imagemin()) .pipe(gulp.dest(bases.dist)); }); // Copy all other files to dist directly gulp.task('copy', function() { // Copy html gulp.src(paths.html, {cwd: bases.app}) .pipe(gulp.dest(bases.dist)); // Copy styles gulp.src(paths.styles, {cwd: bases.app}) .pipe(gulp.dest(bases.dist + 'styles')); // Copy lib scripts, maintaining the original directory structure gulp.src(paths.libs, {cwd: 'app/**'}) .pipe(gulp.dest(bases.dist)); // Copy extra html5bp files gulp.src(paths.extras, {cwd: bases.app}) .pipe(gulp.dest(bases.dist)); }); // A development task to run anytime a file changes gulp.task('watch', function() { gulp.watch('app/**/*', ['scripts', 'copy']); }); // Define the default task as a sequence of these tasks gulp.task('default', ['clean', 'scripts', 'copy']);