Created
April 9, 2014 06:34
-
-
Save andrewmartin/10232136 to your computer and use it in GitHub Desktop.
gulpfile-viget-pattern-test.js
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 characters
var watch = require('gulp-watch'), | |
livereload = require('gulp-livereload'); | |
gulp = require("./gulp")([ | |
"nodemon", | |
"coffee", | |
"stylus", | |
"concat_app", | |
"concat_vendor", | |
"uglify_app", | |
"uglify_vendor", | |
// "jst-concat", | |
"cssmin" | |
]); | |
gulp.task("watch", function() { | |
gulp.watch([ | |
'public/stylesheets/**/*.styl' | |
], ['stylus']); | |
gulp.watch([ | |
// our watched files | |
'**/*.coffee' | |
], [ | |
// our tasks to run | |
'coffee' | |
]); | |
gulp.watch([ | |
'public/javascripts/*.js' | |
], [ | |
'concat_app', | |
'concat_vendor' | |
]); | |
var server = livereload(); | |
gulp.watch([ | |
'public/stylesheets/application.css', | |
'public/javascripts/*.js' | |
]) | |
.on('change', function(file) { | |
server.changed(file.path); | |
}); | |
}); | |
// dev server | |
gulp.task("server", ["nodemon"]); | |
// compile stuff | |
gulp.task("compile", [ | |
"coffee", | |
"stylus" | |
]); | |
// minify/compress. | |
// i'd think we could actually build these all out using pipe | |
gulp.task("compress", [ | |
"concat_app", | |
"concat_vendor", | |
"uglify_app", | |
"uglify_vendor", | |
"cssmin" | |
]); | |
// DEVELOP: basic watch task. | |
gulp.task("default", [ | |
"compile", | |
"compress", | |
"watch" | |
]); | |
// PRODUCTION: basic compilation step. | |
gulp.task("build", [ | |
"compile", | |
"compress" | |
]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment