-
Notifications
You must be signed in to change notification settings - Fork 116
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
copy JS to static docs directory and use that instead #1248
Conversation
|
fcc3c9e
to
1f650ee
Compare
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.
I think this is probably fine. I do wish the js world had a better way of including local packages though.
@@ -26,7 +26,7 @@ | |||
"scripts": { | |||
"build:docs": "cd docs && yarn gatsby build --prefix-paths", | |||
"build:docs:preview": "cd docs && yarn gatsby build", | |||
"prepare": "tsc && rollup -c", | |||
"prepare": "rm -rf docs/static && mkdir docs/static && tsc && rollup -c && cp app/assets/javascripts/primer_view_components.js docs/static/primer_view_components.js", |
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.
Is there anything else in docs/static that this command is blowing away?
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.
Nope, this is a new directory!
Trying to fix:
Currently I'm unable to share a documentation site with my JS changes because the docs preview and codespaces both pull in the published JS package in npm rather than the changes on my branch.
This means even when code is merged, people are unable to see JS changes on the docs site until a new PVC release is cut which is not ideal since the JS on the docs site should reflect whats in the codebase.
This is a workaround I used in the past but I'm not sure it's actually what we want.