Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Destination file suffix support #2

Merged
merged 2 commits into from
Feb 15, 2014
Merged

Destination file suffix support #2

merged 2 commits into from
Feb 15, 2014

Conversation

mprencipe
Copy link
Contributor

I added support for specifying suffix for destination files. The use case is languages that compile to JavaScript, e.g. CoffeeScript.

@tschaub
Copy link
Owner

tschaub commented Feb 15, 2014

Nice! Thanks @mprencipe. This is a clearly missing feature to make the plugin useful. What do you think about accepting a config object with dest and ext members instead of two arguments? I just suggested something similar in #1. If there are likely to be other configuration options, I like the idea of a single arg.

It looks like there is a minor JSHint complaint as well.

@tschaub
Copy link
Owner

tschaub commented Feb 15, 2014

We could still accept a single string arg as well. If string, it is the dest path. If object, it must have a string dest value.

@mprencipe
Copy link
Contributor Author

Sorry I totally missed issue #1. Fixed newer() so that it accepts either a string or an object. I added lodash as a dependency, hope you don't mind.

tschaub added a commit that referenced this pull request Feb 15, 2014
Destination file suffix support.
@tschaub tschaub merged commit 0353425 into tschaub:master Feb 15, 2014
@tschaub
Copy link
Owner

tschaub commented Feb 15, 2014

Thanks for the contribution @mprencipe!

I like the name "suffix" but I think it conforms better with Node's path.extname and Grunt's ext file configuration property to use the name "ext" for the option. I've done this in #3. Hope that looks ok to you.

@mprencipe
Copy link
Contributor Author

Look great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants