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

Utility to run local demo #5

Open
rowanc1 opened this issue Jul 6, 2021 · 5 comments
Open

Utility to run local demo #5

rowanc1 opened this issue Jul 6, 2021 · 5 comments
Labels
enhancement New feature or request

Comments

@rowanc1
Copy link
Member

rowanc1 commented Jul 6, 2021

Right now I believe the process is commenting on/off the local script and just opening this up in any webserver or file://.

It would be great to add a npm run start or dev to bring up a live reloading server on file changes (including styles where appropriate). This is more helpful for the more complicated repos like docutils.

This also means the deploy might need to go into a github action (e.g. have done that here), that would allow us to rely on the locally built package rather than the deployed npm package (e.g. not ready to release, but still want the demo updated).

@rowanc1 rowanc1 added the enhancement New feature or request label Jul 6, 2021
@chrisjsewell
Copy link
Member

chrisjsewell commented Jul 6, 2021

Yeh I was already planning to do this. It shouldn't be that hard.

This is more helpful for the more complicated repos like docutils.

If you want to see changes, its not hard at all though: just got to docs/index.html and "swap" the css+js scripts in the header for the commented out local variants. Then you can just run npm run build every time you want to update, or just npm run sass if you are only changing the sass/scss files.

that would allow us to rely on the locally built package rather than the deployed npm package

so yeh if you do what I say above you can already rely on the locally built files

@chrisjsewell
Copy link
Member

(note what I said above applies specifically to the setup in markdown-it-docutils)

@rowanc1
Copy link
Member Author

rowanc1 commented Jul 6, 2021

It would be great to get this in one command that gets a local demo up, watching/rebuilding/reloading, so we don't have to remember/or accidentally commit incorrect things. Have done this a bunch in webpack, I am sure there are simple equivalents in the rollup world.

@chrisjsewell
Copy link
Member

oh yeh exactly, I just hadn;t got round to looking yet (plus figuring out how to have the index.html auto-use local scripts vs URL scripts, based on context)

@chrisjsewell
Copy link
Member

Although there is obviously nothing stopping you from working it out 😜

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants