Menu icon Foundation
Use gulp

hi,

i have set up a project in Foundation 6.

I perform the

/usr/bin/foundation watch

 

command in order to keep my CSS updated. I get:

 

> gulp

[13:11:49] Using gulpfile ~/Desktop/myproject/gulpfile.js
[13:11:49] Starting 'sass'...
[13:11:50] Finished 'sass' after 947 ms

it looks like gulp performs this action if i am right.

I would like to experiment a little with gulp, but even if i add lines inside the gulpfile.js they dont seem to take any action.

For example i have added this line in the end of my gulpfile.js in order to check if the file executes:

gulp.task('greet', function () {
   console.log('Hello world!');
});

 

but i don't see any console message.

thanks

gulp

hi,

i have set up a project in Foundation 6.

I perform the

/usr/bin/foundation watch

 

command in order to keep my CSS updated. I get:

 

> gulp

[13:11:49] Using gulpfile ~/Desktop/myproject/gulpfile.js
[13:11:49] Starting 'sass'...
[13:11:50] Finished 'sass' after 947 ms

it looks like gulp performs this action if i am right.

I would like to experiment a little with gulp, but even if i add lines inside the gulpfile.js they dont seem to take any action.

For example i have added this line in the end of my gulpfile.js in order to check if the file executes:

gulp.task('greet', function () {
   console.log('Hello world!');
});

 

but i don't see any console message.

thanks

Cam Heikkinen about 3 years ago

You'd have to run

gulp greet

You named the task 'greet'. If you want it to run by default, then add it to the main 'watch' task or whatever your default task is.

Juan Oliver about 3 years ago

This is an example of part of gulpfile.js, you can fit your needs. you just have to run the command gulp:

 

gulp.task('default', function() {
  browserSync.init({
        server: "./"
    });
  gulp.watch("scss/*.scss", ['sass']);
  gulp.watch("templates/jade/**/*.jade",['jade']);
  gulp.watch("./*.html").on('change', browserSync.reload);
});

Jarryd Fillmore about 3 years ago

+1!