var gulp = require('gulp'); gulp.task('hello', function(){ console.log('hello world'); }); gulp.task('default', ['hello']);
[vagrant@localhost front]$ gulp
[20:04:00] Using gulpfile ~/local/front/gulpfile.js
[20:04:00] Starting ‘hello’…
hello world
[20:04:00] Finished ‘hello’ after 126 μs
[20:04:00] Starting ‘default’…
[20:04:00] Finished ‘default’ after 13 μs
copy & paste は.srcと.pipe
var gulp = require(‘gulp’);
gulp.task(‘html’, function(){
gulp.src(‘./src/*.html’)
.pipe(gulp.dest(‘./dest’))
});
gulp.task(‘default’, [‘html’]);
[/html]