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

Delete plugin auxiliary metadata from files #22

Merged
merged 1 commit into from
Mar 8, 2017
Merged

Delete plugin auxiliary metadata from files #22

merged 1 commit into from
Mar 8, 2017

Conversation

ycherniavskyi
Copy link
Contributor

If found possibility to resolve #18 in minor harm way - just delete auxiliary metadata from files after plugin finishes its work.
So with such fix plugin could be called as many time as needed.

I tried to implement the test for this functionality, but without changing plugins parameter of test function from Object to Array it seems not possible (because this test must use the same plugin .. several times).

@ycherniavskyi
Copy link
Contributor Author

With this functionality my current usage looks something like this:

...

metalsmith
  .use($m.jstransformer({
    pattern: '**.html.md',
    layoutPattern: '!**',
  }));

metalsmith
  .use($m.branch('blog/*/**')
    .use($m.wordCount())
    .use($m.betterExcerpts())
  );

metalsmith
  .use($m.jstransformer({
    pattern: '**.html*',
    layoutPattern: 'layouts/**',
  }));

...

@RobLoach
Copy link
Contributor

RobLoach commented Mar 8, 2017

Good call, we don't need that cached information. Nicely done! 👍

@RobLoach RobLoach merged commit 7e26f9a into kalamuna:master Mar 8, 2017
@ycherniavskyi ycherniavskyi deleted the delete-auxiliary-metadata branch March 30, 2017 10:09
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.

Extend plugin with possibility to process one transformation per use
2 participants