Skip to content

Moving external example code to the examples folder #2457

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

Merged
merged 35 commits into from
Feb 15, 2020

Conversation

garethx
Copy link
Contributor

@garethx garethx commented Jan 30, 2020

Continuing #2452, with this PR the code for all remaining external code examples in the guide will now be in the examples folder. The benefit is reducing the bus-factor and improve maintainability by making the code accessible to update by all.

Once merged the following URLs will work: 
https://codesandbox.io/embed/github/vuejs/vuejs.org/tree/master/src/v2/examples/vue-20-two-way-currency-filter?codemirror=1&hidedevtools=1&hidenavigation=1&theme=light&view=preview
https://codesandbox.io/embed/github/vuejs/vuejs.org/tree/master/src/v2/examples/vue-10-two-way-currency-filter-v3?codemirror=1&hidedevtools=1&hidenavigation=1&theme=light&view=preview
https://codesandbox.io/embed/github/vuejs/vuejs.org/tree/master/src/v2/examples/vue-10-two-way-currency-filter-v2?codemirror=1&hidedevtools=1&hidenavigation=1&theme=light&view=preview
https://codesandbox.io/embed/github/vuejs/vuejs.org/tree/master/src/v2/examples/vue-10-two-way-currency-filter?codemirror=1&hidedevtools=1&hidenavigation=1&theme=light&view=preview

For testing, use:
https://codesandbox.io/embed/github/gareth/vuejs.org/tree/master/src/v2/examples/vue-20-two-way-currency-filter?codemirror=1&hidedevtools=1&hidenavigation=1&theme=light&view=preview
https://codesandbox.io/embed/github/garethx/vuejs.org/tree/master/src/v2/examples/vue-10-two-way-currency-filter-v3?codemirror=1&hidedevtools=1&hidenavigation=1&theme=light&view=preview
https://codesandbox.io/embed/github/garethx/vuejs.org/tree/master/src/v2/examples/vue-10-two-way-currency-filter-v2?codemirror=1&hidedevtools=1&hidenavigation=1&theme=light&view=preview
https://codesandbox.io/embed/github/garethx/vuejs.org/tree/master/src/v2/examples/vue-10-two-way-currency-filter?codemirror=1&hidedevtools=1&hidenavigation=1&theme=light&view=preview
@NataliaTepluhina
Copy link
Member

Thank you for this huge improvement @garethx! The review might take a few days due to a big diff size so please don't mind a slight delay with merging 😅

@NataliaTepluhina NataliaTepluhina self-assigned this Jan 30, 2020
Copy link
Member

@NataliaTepluhina NataliaTepluhina left a comment

Choose a reason for hiding this comment

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

@garethx changes look good to me, however, if you try to run start command, it throws an error:

Template render error: (unknown path) [Line 24, Column 30]

This also fails a Netlify deployment job on the CI. Could you please look into it and try to figure out what causes the error? 🙏

Nunjucks throws errors due to use of `{{` and `}}` in the source code of examples, but it isn't rendered so not necessary for it to be checked and can't use 'raw' workaround since it's actual code that gets used.
@garethx
Copy link
Contributor Author

garethx commented Feb 10, 2020

@NataliaTepluhina The template error was caused by some zero width characters. Resolving that lead to another issue with Nunjucks in Hexo erroring on use of {{ and }}. I've added an exclude for those files as I can't use the raw workaround as it's actual source code that gets run, and Nunjucks doesn't need to worry about them anyway as it doesn't need to render them.

@NataliaTepluhina
Copy link
Member

Thanks for the fix! I think we can safely merge now

@NataliaTepluhina NataliaTepluhina merged commit c38480b into vuejs:master Feb 15, 2020
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.

2 participants