diff --git a/.github/workflows/ci-docs.yml b/.github/workflows/ci-docs.yml index 7e3f893..7a0e97c 100644 --- a/.github/workflows/ci-docs.yml +++ b/.github/workflows/ci-docs.yml @@ -24,7 +24,7 @@ jobs: npx playwright install --with-deps - name: Build the website run: | - npm run build + npm run docs:build - name: Check Types run: | npm run check:types diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f71957b..badb437 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -28,13 +28,8 @@ $ nvm use ## Local Development -The local development flow is based around building the docs website, using `wcc` in an SSG based workflow, and running tests. +The local development workflows for WCC are: -### Commands - -These are the main tasks, and you can see them all listed in _package.json#scripts_. - -- `npm run dev` - Builds the docs site for local development - `npm test` - Run all the tests - `npm test:tdd` - Run all the tests in watch mode - `npm run lint` - Run all linters @@ -45,11 +40,11 @@ These are the main tasks, and you can see them all listed in _package.json#scrip The website is built with [**Greenwood**](https://www.greenwoodjs.dev). To run the website locally, use one of the following commands: -- `npm run dev` - Start the dev server -- `npm run build` - Generate a production build -- `npm run serve` - Serve a production build +- `npm run docs:dev` - Start the dev server +- `npm run docs:build` - Generate a production build +- `npm run docs:serve` - Serve a production build -To run tests for the website, first make sure you have at least run `npm run build`, then: +To run tests for the website, first make sure you have at least run `npm run docs:build`, then: - `npm run test:docs` - Run a single suite of tests with Vitest - `npm run test:docs:tdd` - Run the test suite with Vitest in watch mode diff --git a/netlify.toml b/netlify.toml index fe3be9a..3f34fb2 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,6 +1,6 @@ [build] publish = "public/" - command = "npm run build" + command = "npm run docs:build" [build.processing] skip_processing = true diff --git a/package.json b/package.json index 1eaf68c..bbbfa3b 100644 --- a/package.json +++ b/package.json @@ -37,9 +37,9 @@ "access": "public" }, "scripts": { - "dev": "greenwood develop", - "build": "NODE_OPTIONS='--import @greenwood/cli/register' greenwood build", - "serve": "greenwood serve", + "docs:dev": "greenwood develop", + "docs:build": "NODE_OPTIONS='--import @greenwood/cli/register' greenwood build", + "docs:serve": "greenwood serve", "lint": "npm run lint:js && npm run lint:ls && npm run lint:css", "lint:js": "eslint", "lint:ls": "ls-lint",