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

a flag to not build index.html #4258

Merged
merged 1 commit into from
Jul 22, 2021
Merged

a flag to not build index.html #4258

merged 1 commit into from
Jul 22, 2021

Conversation

fiji-flo
Copy link
Contributor

This is useful when using yari as SPA

@fiji-flo fiji-flo requested a review from peterbe July 20, 2021 14:31
Copy link
Contributor

@peterbe peterbe left a comment

Choose a reason for hiding this comment

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

Surely the tests are failing due to the noHTML vs !noHTML :)

@@ -15,6 +15,9 @@ function gatherTranslations() {
for (const {
metadata: { slug, locale, title },
} of iter) {
if (!slug) {
Copy link
Contributor

Choose a reason for hiding this comment

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

What's this??

build/cli.js Outdated
path.join(outPath, "index.html"),
renderHTML(document.url, { doc: builtDocument })
);
if (noHTML) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (noHTML) {
if (!noHTML) {

no?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No idea how that disappeared 😱 But that happened when I renamed the parameter. This PR is even more broken.

@peterbe
Copy link
Contributor

peterbe commented Jul 21, 2021

Another interesting one to consider is all the other things that builds.
What about yarn build --no-contributorstxt or yarn build --no-images.

Or, what about yarn build --json-only. This one would certainly be useful when you're viewing the Flaws Dashboard.

option to not build index.html files
@fiji-flo
Copy link
Contributor Author

Sorry for that mess, good catch. Beyond my mess, for some reason naming the option --no-html has issues.

@fiji-flo
Copy link
Contributor Author

We might wanna add more granularity to it. For now this builds everything needed for client side rendering.

build/cli.js Show resolved Hide resolved
@peterbe peterbe merged commit 8659245 into mdn:main Jul 22, 2021
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