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
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ We use 11ty for processing CSS and HTML for the website, and Rollup.js for bundl
2. `cd` to the project directory and run `npm install` to install local modules
3. Done! Now run `npm run build` to build.

Run `npm run watch:html` before you start working on the website to build automatically as you edit files.
Run `npm run watch` before you start working on the website to build
automatically as you edit files. This also serves the website at http://localhost:8080/.

Or, for individual tasks:

- `npm run watch:html` to build HTML
- `npm run watch:html` to build HTML and run a development server.
- `npm run watch:css` to process PostCSS files (`*.src.css` in our repo)
- `npm run watch:js` to create Color.js bundles in `dist/`

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"build:space-accessors": "node ./scripts/generate-space-accessor-types.js",
"build": "run-s build:html build:css build:js build:js:legacy build:space-accessors",
"watch:css": "npx postcss \"**/*.postcss\" --base . --dir . --ext .css --config postcss.config.cjs --watch",
"watch:html": "npx @11ty/eleventy --config=.eleventy.cjs --watch",
"watch:html": "npx @11ty/eleventy --config=.eleventy.cjs --watch --serve",
jamesnw marked this conversation as resolved.
Show resolved Hide resolved
"watch:js": "rollup -c --watch",
"watch": "run-p watch:*",
"prepack": "npm run build",
Expand Down