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

feat(npm): add yari-build-blog command #9468

Merged
merged 1 commit into from
Aug 10, 2023
Merged

feat(npm): add yari-build-blog command #9468

merged 1 commit into from
Aug 10, 2023

Conversation

LeoMcA
Copy link
Member

@LeoMcA LeoMcA commented Aug 9, 2023

Summary

Problem

Building yari in the blog CI takes time.

Solution

Expose the build:blog command so we can make use of the pre-built npm package.


How did you test this change?

git clone yari yari-npm-test # so it's easy to clean up the js files which get generated from typescript compilation
cd yari-npm-test
yarn
# emulate npm-publish workflow
export REACT_APP_WRITER_MODE=true
export REACT_APP_DISABLE_AUTH=true
export CONTENT_ROOT=testing/content/files
yarn build:prepare
npm pack
# install in content
cd ../content
yarn add ../yari-npm-test/mdn-yari-2.28.4.tgz
npx yari-build-blog

@LeoMcA LeoMcA requested a review from bsmth August 9, 2023 12:55
Copy link
Member

@bsmth bsmth left a comment

Choose a reason for hiding this comment

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

I can follow the steps to repro successfully now, thank you 👍🏻

yarn yari-build-blog
yarn run v1.22.19
$ /Users/bsmith/Code/forks/content-test/content/node_modules/.bin/yari-build-blog
...
✨  Done in 1.81s.

@LeoMcA
Copy link
Member Author

LeoMcA commented Aug 10, 2023

Ah, didn't realise yarn could behave like npx too - that's cool, mixing the two is probably a bad idea.

I'll merge, then cut an npm release, it'll take a little while for dependabot to pick up that change in content, but then you'll be able to clone content in the blog ci, and use its yari for building the blog.

@LeoMcA LeoMcA merged commit 9414524 into main Aug 10, 2023
14 checks passed
@LeoMcA LeoMcA deleted the npm-build-blog branch August 10, 2023 09:45
@bsmth
Copy link
Member

bsmth commented Aug 10, 2023

Excellent, thank you!

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