Skip to content
This repository has been archived by the owner on Jan 23, 2021. It is now read-only.

Generalized API #3

Closed
wants to merge 5 commits into from
Closed

Generalized API #3

wants to merge 5 commits into from

Conversation

popham
Copy link
Contributor

@popham popham commented May 14, 2014

Here's the pull request that I suggested in #2. I was mistaken about Dust's interface, though. According to Dust issue 238, the flag that I mentioned is some kind of reverse compatibility to retain leading whitespace. I suspect the intended use is something like plain text files: when the normal compression gets applied, new lines would turn into joined words. At any rate, that use doesn't suit my needs, so I've entirely disabled whitespace optimization rather than set that flag:

dust.optimizers.format = function(ctx, node) { return node; };

Rather than adding a second optional parameter to the signature, I've implemented an options blob. Tests pass and the version has been bumped. (There's reverse compatibility if a function is provided instead of an object.)

@@ -1,6 +1,6 @@
{
"name": "gulp-dust",
"version": "0.2.0",
"version": "0.3.0",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't bump the version in PRs. I use a release script that does it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the script also tag the repo? I've tagged it also.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes. you generally shouldn't bump it anyways. i might not be ready to release a new version or even choose a different one.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right.

@sindresorhus
Copy link
Owner

Nice work. Available in 0.3.0 ;)

@popham
Copy link
Contributor Author

popham commented May 15, 2014

Thanks. Putting it to good use already.

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

Successfully merging this pull request may close these issues.

2 participants