Skip to content

Fixed the path to the plugins object. Issue 91 on the edition-node-gulp repo #558

New issue

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

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

Already on GitHub? # to your account

Merged

Conversation

giuseppepaul
Copy link
Contributor

Minor change to fix this issue: pattern-lab/edition-node-gulp#91
Updated the path to the plugins object.

Copy link
Member

@bmuenzenmeyer bmuenzenmeyer left a comment

Choose a reason for hiding this comment

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

I had almost finished my own version of this fix but thought you might want to alter yours instead.

The path is correct in fact - as you can by looking at the internals of https://github.com/pattern-lab/plugin-node-tab/blob/master/index.js#L64-L68 The patternlab.plugins object is internal and different from that of the config object.

Change the call to a patternlab.plugins || [] and we can move forward! :)

@giuseppepaul
Copy link
Contributor Author

I've updated it and it works fine :)

output += 'var plugins = ' + JSON.stringify(patternlab.plugins || []) + ';' + eol;

...but before I push it, I was thinking maybe an if statement inside the buildFrontend function before exportData gets called might be cleaner?

if (patternlab.plugins === undefined) patternlabs.plugins = [];

What do you think?

@bmuenzenmeyer
Copy link
Member

I am okay with either solution - but prefer mine more because it's closer to the eventual output

@giuseppepaul
Copy link
Contributor Author

No probs, I've updated :) cheers

@bmuenzenmeyer bmuenzenmeyer merged commit f5bab2a into pattern-lab:dev Nov 16, 2016
@bmuenzenmeyer
Copy link
Member

Thanks for the help @giuseppepaul

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

Successfully merging this pull request may close these issues.

2 participants