Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you actually need to maintain well-used JavaScript projects, tools like Gulp are extremely important and time-saving.

Here is what the build process looks like for the faker.js project:

return gulp.src('../index.js')

  .pipe(browserified)
  
  .pipe(rename('faker.js'))
  
  .pipe(gulp.dest('build/'))
  
  .pipe(gulp.dest('../examples/browser/js'))
  
  .pipe(rename({ extname: ".min.js" }))
  
  .pipe(uglify())
  
  .pipe(gulp.dest('build/'))
  
  .pipe(gulp.dest('../examples/browser/js'))
  
  .pipe(rename('../examples/browser/js/faker.min.js'));
  
});

https://github.com/Marak/faker.js/blob/master/build/gulpfile...

If you ask me, Gulp provides a pretty elegant syntax. Before using Gulp we had a custom script to build the project. Using Gulp has been much better.

His comments about the Gulp ecosystem not fully supporting streaming is true. The onus of implementing streaming correctly in plugins is on the plugin author. Unfortunately, there are a few plugin developers who are making bad plugins. You have to understand which libraries you are installing before blinding running npm install.

Something which is very interesting about Gulp is it's underlaying Virtual File System (Vinyl) https://github.com/wearefractal/vinyl The entire ecosystem is now improving as more Gulp plugins are being decoupled into vinyl virtual file system adapters ( think sftp / http / ftp / webdav )



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: