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

Introduce a command to regenerate examples/index.html and lint that it is run #1365

Closed
wants to merge 2 commits into from

Conversation

zcorpan
Copy link
Member

@zcorpan zcorpan commented Apr 3, 2020

The command to regenerate is: npm run build

The new lint command is: npm run lint:build

Document this in the README. Run the new lint in Travis CI to ensure that
PRs that change something under examples/ also regenerate the index.

Fixes #1079.

…t is run

The command to regenerate is: npm run build

The new lint command is: npm run lint:build

Document this in the README. Run the new lint in Travis CI to ensure that
PRs that change something under examples/ also regenerate the index.

Fixes #1079.
@zcorpan
Copy link
Member Author

zcorpan commented Apr 3, 2020

See #1366 for a demonstration of the new linter failing in Travis CI.

@zcorpan zcorpan requested a review from mcking65 April 14, 2020 13:05
@zcorpan zcorpan requested a review from smhigley May 28, 2020 15:18
@zcorpan
Copy link
Member Author

zcorpan commented May 28, 2020

@smhigley can you review this?

Copy link
Contributor

@smhigley smhigley left a comment

Choose a reason for hiding this comment

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

I like it :)

@mcking65
Copy link
Contributor

mcking65 commented Jun 1, 2020

Thank you @zcorpan and @smhigley

I was starting to have second thoughts, wondering if this could sometimes result in conflicts within the examples/index.html file. Perhaps it could if we were to rename an example file. It would mean hand-editing a generated file to resolve conflicts during a rebase.

However, such circumstances should be very rare. In fact, the examples/index.html doesn't change very often. So, maybe we should just give this a try and see how it goes.

This is just one of those situations where the creakiness of our overall versioning/build process is manifest. We could simply do this during CI to push changes to examples;/index.html to gh-pages, but that would then create the possibility of the index.html getting out-of-date in our protected publication branches, which are separate from master and gh-pages. This all gets easier when dwe get to a place where we can stop versioning the APG.

@smhigley
Copy link
Contributor

smhigley commented Jun 1, 2020

@mcking65 I'm not sure I follow; why would this change have any effect on git conflicts? People should already be updating examples/index.html when necessary, and this change just checks (and makes the build error) if they've forgotten to.

It looks like it correctly caught an error in master after your merge, as it looks like examples/index.html was not regenerated after the tabbed carousel example was added.

@spectranaut
Copy link
Contributor

Closing in favor of #1524

@spectranaut spectranaut closed this Dec 2, 2020
@zcorpan zcorpan deleted the zcorpan/ensure-generated-examples-index branch May 31, 2021 12:23
@zcorpan zcorpan restored the zcorpan/ensure-generated-examples-index branch May 31, 2021 12:23
@zcorpan zcorpan deleted the zcorpan/ensure-generated-examples-index branch May 31, 2021 12:23
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.

Autogenerated and check in examples/index.html
4 participants