cheshire137 / gulp-ruby-haml

Haml plugin for Gulp that uses the Ruby Haml gem.
https://www.npmjs.com/package/gulp-ruby-haml
MIT License
27 stars 13 forks source link

Addresses https://github.com/moneypenny/gulp-ruby-haml/issues/10 #11

Closed akshat1 closed 9 years ago

akshat1 commented 9 years ago

This patch will allow the haml() plugin to process haml without requiring it to exist on the physical disk.

Instead of supplying the haml command with the path of an input file, we supply the switch -s, and write the haml to childprocess.stdin. This lets us do the following (for instance)


gulp.src('foo/bar/**/*.haml')
  .pipe(replace('albert', 'dilbert'))
  .pipe(haml())
  .pipe(gulp.dest('baz'));

Earlier, since (the current version) plugin works by passing the absolute path of the haml source file, one would first have to write the output of replace to a temp folder.

cheshire137 commented 9 years ago

Tests still run locally. Thanks!

akshat1 commented 9 years ago

:+1: Thank you for the awesome plugin!