Skip to content

Commit

Permalink
Update gitignore to ignore node_modules directory and npm-debug.
Browse files Browse the repository at this point in the history
Fixed gulpfile to work with updated browsersync and gulp watch api.
  • Loading branch information
Adam Morse authored and Adam Morse committed Mar 5, 2015
1 parent c1cb6ee commit ce167ef
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.sass-cache/
.sass-cache/
npm-debug.log
node_modules
33 changes: 16 additions & 17 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Gulp tasks for MNML

// Load plugins
// Load plugins
var gulp = require('gulp'),
gutil = require('gulp-util'),
watch = require('gulp-watch'),
Expand Down Expand Up @@ -49,26 +49,25 @@ gulp.task('csslint', function(){

// Task that compiles scss files down to good old css
gulp.task('pre-process', function(){
gulp.src('./sass/mnml.scss')
.pipe(watch(function(files) {
return files.pipe(sass())
.pipe(prefix())
.pipe(size({gzip: false, showFiles: true}))
.pipe(size({gzip: true, showFiles: true}))
.pipe(gulp.dest('css'))
.pipe(minifyCSS())
.pipe(rename('mnml.min.css'))
.pipe(size({gzip: false, showFiles: true}))
.pipe(size({gzip: true, showFiles: true}))
.pipe(gulp.dest('./css/'))
.pipe(browserSync.reload({stream:true}));
}));
watch("./sass/mnml.scss", function(files) {
return files.pipe(sass())
.pipe(prefix())
.pipe(size({gzip: false, showFiles: true}))
.pipe(size({gzip: true, showFiles: true}))
.pipe(gulp.dest('css'))
.pipe(minifyCSS())
.pipe(rename('mnml.min.css'))
.pipe(size({gzip: false, showFiles: true}))
.pipe(size({gzip: true, showFiles: true}))
.pipe(gulp.dest('./css/'))
.pipe(browserSync.reload({stream:true}));
});
});

// Initialize browser-sync which starts a static server also allows for
// Initialize browser-sync which starts a static server also allows for
// browsers to reload on filesave
gulp.task('browser-sync', function() {
browserSync.init(null, {
browserSync({
server: {
baseDir: "./"
}
Expand Down

0 comments on commit ce167ef

Please sign in to comment.