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

Inject Data Into Assembly.data #284

Open
camdagr8 opened this issue Feb 3, 2017 · 1 comment
Open

Inject Data Into Assembly.data #284

camdagr8 opened this issue Feb 3, 2017 · 1 comment
Milestone

Comments

@camdagr8
Copy link

camdagr8 commented Feb 3, 2017

I was wondering if there was a way to inject data into the assembly.data object.

I see the parseData() function in the assembler but don't see a means to inject anything into that object w/o modifying the parseData() function.

If there was a config option for this similar to the helpers, that would be great. I'd like to avoid modifying the assembler.

@camdagr8
Copy link
Author

camdagr8 commented Feb 3, 2017

As a follow up to this, I'm trying to create a dependency tracker so that I can see where partials are being used so that I can quickly asses risk caused by changes.

I've come up with a decent work around that involved me creating a version of the parseMaterials() function in my gulp file and writing data to a .json file. I triggered the function in the assembler:watch task.

This however caused me to have to exclude the .json file from the config.templates.watch array.
And specify the config.materials and config.views values (even though they are the same as what is being used by default, I needed the values for my custom parse function).

It would be really cool to be able to inject that info into the assembly so that it could be used like the views and materials object.

@LukeAskew LukeAskew added this to the 2.0.0 milestone Apr 6, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants