Closed kyooriouskoala closed 7 years ago
Hmm to clarify: are you saying that the use of the second consolidation task is impacting the result of the first, when both are run concurrently?
If so try transforming/returning a clone of data
like this:
markdownToJson(marked, 'patterns.json', (data, file) => {
var navItem = Object.assign({}, data);
delete navItem.body;
navItem.path = file.path;
return navItem;
})
My example is probably bad encouraging mutating the Vinyl object, was not expecting the possibility of an instance to be shared across separate tasks..
Hmm to clarify: are you saying that the use of the second consolidation task is impacting the result of the first, when both are run concurrently?
Yup!
I attempted to "clone" the data but it wasn't working; must have done it wrong. Tried your solution and unfortunately it doesn't seem to be working either = /
I'm open to try new solutions if you have any other. In the mean time, I'll just use an extra gulp plugin for the navigation structure.
Thank you!
You can try run-sequence for running the tasks sequentially.
@kyooriouskoala think I found the culprit, thanks for reporting this! Please confirm my fix addresses your issue:
npm install sparkartgroup/gulp-markdown-to-json#fix-cached-plugin-config
@pushred : Yay! It works! š
Thanks for testing! Released as 1.0.2
Hi! I'm generating html file with PUG via markdown json:
Then what I'd like to do next is to generate a consolidated JSON output with 'body' key removed for navigation structure purpose.
The consolidated JSON output is what I expected but it strips off the 'body' from the generated HTML pages as well.