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

copy JS to static docs directory and use that instead #1248

Merged
merged 1 commit into from
Aug 1, 2022

Conversation

khiga8
Copy link
Contributor

@khiga8 khiga8 commented Jul 30, 2022

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.

@changeset-bot
Copy link

changeset-bot bot commented Jul 30, 2022

⚠️ No Changeset found

Latest commit: 1f650ee

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@khiga8 khiga8 requested a review from keithamus July 30, 2022 00:34
@khiga8 khiga8 temporarily deployed to github-pages July 30, 2022 00:35 Inactive
@khiga8 khiga8 temporarily deployed to github-pages July 30, 2022 05:58 Inactive
@khiga8 khiga8 marked this pull request as ready for review August 1, 2022 16:44
@khiga8 khiga8 requested a review from a team August 1, 2022 16:44
Copy link
Contributor

@camertron camertron left a 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",
Copy link
Contributor

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?

Copy link
Contributor Author

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!

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