roots/roots — pull request #1068 by SpeakInCode (2014-06-29 03:34:50+00:00)
Title: Compiling Foundation partials on save

Added:

``` 'bower_components/foundation/scss/foundation/components/_*.scss' ```

to ``` gulp.task('sass', function()``` and ``` gulp.task('watch', function() ```
to compile the partial files and livereload them on save.

Examples:
```javascript
gulp.task('sass', function (){
gulp.src([
'bower_components/foundation/scss/normalize.scss', // Gets normalize
'bower_components/foundation/scss/foundation/components/_*.scss', // Gets Partials
'assets/scss/app.scss']) // Gets the apps scss
.pipe(sass({style: 'compressed', errLogToConsole: true})) // Compile sass
.pipe(concat('main.css')) // Concat all css
.pipe(rename({suffix: '.min'})) // Rename it
.pipe(minifycss()) // Minify the CSS
.pipe(gulp.dest('assets/css/')) // Set the destination to assets/css
.pipe(livereload()); // Reloads server
util.log(util.colors.yellow('Sass compiled & minified')); // Output to terminal
});
```
and
```javascript
gulp.task('watch', function(){

var server = livereload();
gulp.watch('**/*.php').on('change', function(file) {
server.changed(file.path);
util.log(util.colors.yellow('PHP file changed' + ' (' + file.path + ')'));
});

gulp.watch("assets/scss/**/*.scss", ['sass']); // Watch and run sass on changes
gulp.watch("bower_components/foundation/scss/foundation/components/_*.scss", ['sass']);
gulp.watch("assets/js/_*.js", ['jshint', 'javascripts']); // Watch and run javascripts on changes
gulp.watch("assets/img/*", ['imagemin', 'svgmin']);	// Watch and minify images on changes

});
```