Skip to content

Instantly share code, notes, and snippets.

@mhasan3
Last active August 29, 2015 14:05
Show Gist options
  • Save mhasan3/6e8a73902e45e36ddf82 to your computer and use it in GitHub Desktop.
Save mhasan3/6e8a73902e45e36ddf82 to your computer and use it in GitHub Desktop.
test gulp file
var gulp = require('gulp');
var minifycss = require('gulp-minify-css');
var autoprefixer = require('gulp-autoprefixer');
var notify = require('gulp-notify');
var stripDebug = require('gulp-strip-debug');
var uglify = require('gulp-uglify');
gulp.task('css', function() {
return gulp.src('assets/css/sentinel.css')
.pipe(autoprefixer())
.pipe(minifycss())
.pipe(gulp.dest('assets/css/test'));
// .pipe(notify({message: 'All done :) '}));
});
gulp.task('js', function() {
return gulp.src('assets/js/prime.js')
.pipe(stripDebug())
.pipe(uglify())
.pipe(gulp.dest('assets/js/test'));
// .pipe(notify({message: 'All done :) '}));
});
gulp.task('default', ['css', 'js'], function(){
// gulp.run('css');
gulp.watch('assets/css/*.css', function() {
gulp.run('css');
});
gulp.watch('assets/js/*.js', function() {
gulp.run('js');
});
});
{
"devDependencies": {
"gulp": "^3.8.7",
"gulp-autoprefixer": "0.0.10",
"gulp-minify-css": "^0.3.7",
"gulp-notify": "^1.5.0",
"gulp-strip-debug": "^1.0.0",
"gulp-uglify": "^1.0.0"
}
}
takeaway gulp
[03:40:16] Using gulpfile /var/www/wordpress/wp-content/themes/takeaway/gulpfile.js
[03:40:16] Starting 'css'...
[03:40:16] Starting 'js'...
[03:40:16] Finished 'js' after 28 ms
[03:40:16] Finished 'css' after 229 ms
[03:40:16] Starting 'default'...
[03:40:16] Finished 'default' after 49 ms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment