gobblejs / gobble

The last build tool you'll ever need
333 stars 20 forks source link

Can directory transformers also have defaults? #102

Closed fskreuz closed 8 years ago

fskreuz commented 8 years ago

options is an object. it is shallow-cloned from the user-supplied options object (if none is supplied, it will be created as {}), so you can modify it safely https://github.com/gobblejs/gobble/wiki/Writing-plugins#directory-transformers

There's no mention of defaults like the one in file transformers

options is shallow-cloned from the user-supplied options (plus the defaults, if specified. User options override defaults) https://github.com/gobblejs/gobble/wiki/Writing-plugins#file-transformers

Would it be possible to provide defaults to directory transformers in the same manner as file transformers?

heavyk commented 8 years ago

also a one-liner. :)

Rich-Harris commented 8 years ago

Released as 0.11.0, thanks both!