gulp-community / gulp-haml

gulp plugin for Haml
MIT License
25 stars 20 forks source link

Add option for extension of rendered html file #1

Closed dcorb closed 10 years ago

dcorb commented 10 years ago

I need this for a project where they are using a special extension.

stephenlacy commented 10 years ago

It is a good idea which I will add. Though, I have no idea why you wrote your code the way you did. defaults does not exist, and you are not pulling the options from the main function. https://travis-ci.org/stevelacy/gulp-haml/jobs/17274421

I will add it with my code style in an upcoming release.

dcorb commented 10 years ago

Thanks Yeah, I know. Sorry, I was in a rush this morning. I didn't expect this PR to be merged

A "default extension" is good, and also this could be a good idea: https://github.com/guard/guard-haml#file-extensions

stephenlacy commented 10 years ago

Alright, default extension would be .html with new ext option:

.pipe(gulpHaml({ ext: '.shtml' }))

To prevent this plugin from doing to much, I may create a new plugin for the file extension check you mentioned (guard-haml#file-extensions)

I should be adding the changes today :)

stephenlacy commented 10 years ago

Added extension option, published to 0.0.8