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

Gloryofrobots data hooks via #635 #798

Merged
merged 3 commits into from
Nov 27, 2019
Merged

Conversation

zachleat
Copy link
Member

See #635 for original comments. Fixes #630.

gloryofrobots and others added 3 commits July 28, 2019 23:25
Main changes are in TemplateData.
User config uses new Map() to store pairs (extension, parser) where
parser is a function receiving file contents in string and returning
data object.
Later declared parsers have priority over first ones.
All test data are in test/stubs-630/.

Tests are focused on loading local and global custom data (yaml
and nosj) and checking format priority order. From top to bottom
it must be js-json-nosj-yaml, in the case where nosj declared after yaml
(nosj is a simple JSON file)

js-yaml added to devDependencies
…into gloryofrobots-data-hooks

# Conflicts:
#	src/TemplateData.js
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.

Hooks to allow plugins to customize data file formats (think: yaml, toml, etc)
2 participants