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

Document how to serve in development, and add --serve to watch:html. #467

Merged
merged 2 commits into from
Mar 1, 2024

Conversation

jamesnw
Copy link
Contributor

@jamesnw jamesnw commented Feb 29, 2024

The current npm scripts for development don't include a way to serve the built files. Because 11ty contains a dev server, we can use that.

This adds the --serve flag to npm run watch:html (and by extension npm run watch) so that developers don't need to separately serve the content.

If this is disruptive to existing workflows, we could add an alternate npm run dev that would watch css, js and html, and also serve. Alternatively, we could document how to serve with npx http-server, but since the functionality is already available through 11ty, this seems like a higher burden on contributors.

Copy link

netlify bot commented Feb 29, 2024

Deploy Preview for colorjs ready!

Name Link
🔨 Latest commit ce6bfbf
🔍 Latest deploy log https://app.netlify.com/sites/colorjs/deploys/65e148d6b6e2880008917311
😎 Deploy Preview https://deploy-preview-467--colorjs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

package.json Outdated Show resolved Hide resolved
Co-authored-by: Jonny Gerig Meyer <[email protected]>
@jamesnw jamesnw requested a review from jgerigmeyer March 1, 2024 03:18
@jgerigmeyer jgerigmeyer requested a review from LeaVerou March 1, 2024 03:24
@LeaVerou
Copy link
Member

LeaVerou commented Mar 1, 2024

Would this cause issues for #434 ?

@jgerigmeyer
Copy link
Member

Would this cause issues for #434 ?

I don't think so, no -- this change just means the server will start along with the other watch:* tasks.

#434 is a good idea and will require changes to various aspects of the dev process, so this PR may be temporary.

@LeaVerou
Copy link
Member

LeaVerou commented Mar 1, 2024

Ok, fine by me!

@jgerigmeyer jgerigmeyer merged commit 333bb42 into color-js:main Mar 1, 2024
5 checks passed
@jgerigmeyer jgerigmeyer deleted the serve-doc branch March 1, 2024 19:46
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.

3 participants