-
Notifications
You must be signed in to change notification settings - Fork 503
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
move kumascript .json files to content (yari) #4081
Merged
escattone
merged 14 commits into
mdn:main
from
peterbe:move-kumascript-json-files-to-content-yari
Aug 23, 2021
Merged
move kumascript .json files to content (yari) #4081
escattone
merged 14 commits into
mdn:main
from
peterbe:move-kumascript-json-files-to-content-yari
Aug 23, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Jun 30, 2021
This PR is now blocked on #4487 being merged into |
escattone
reviewed
Aug 23, 2021
escattone
approved these changes
Aug 23, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @peterbe!
astearns
added a commit
to astearns/content
that referenced
this pull request
Nov 14, 2021
I was looking at how to fix an incorrect spec link, and found some instructions made out-of-date by mdn/yari#4081. I have updated this section based on what I think is now the correct workflow with an updated example (based on the most-recent PR I found).
2 tasks
wbamberg
added a commit
to mdn/content
that referenced
this pull request
Dec 23, 2021
* Update instructions for adding new macros I was looking at how to fix an incorrect spec link, and found some instructions made out-of-date by mdn/yari#4081. I have updated this section based on what I think is now the correct workflow with an updated example (based on the most-recent PR I found). * lint fixes * macro/value distinction * values, not strings * Perhaps do it this way? * Update to: Making a change that depends on external content * Fix md-lint errors, hopefully Co-authored-by: Hamish Willee <hamishwillee@gmail.com> Co-authored-by: Will Bamberg <will@bootbonnet.ca>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To test this, you'll need to checkout mdn/content@mdn:main...peterbe:migrate-kumascript-jsondata-to-content-repo too.
Basically, I moved all the
kumascript/macros/*.json
files that are used tocontent/files/jsondata/
in thecontent
repo.That's about it! Then I simply replaced all the
JSON.parse(await template("GroupData"))
withweb.getJSONData("GroupData")
, for example, and made sure there were no newMacroExecutionError
.The whole point of this is to move those files over to
mdn/content
where they belong.This PR is a draft because it's just a prototype and to make this land we'd need to:
mdn/content
, that runs thekumascript
unit tests in YariBonus! Because the reads of the JSON are memoized in when
process.env.NODE_ENV==='production'
there's actually going to be a slight performance boost to the total build time. Before we used to read those files, andJSON.parse()
, 26,017 times just foren-US
alone. Now, it becomes 1 per each.json
file once.