diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 6d06457..78b52d1 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -110,6 +110,9 @@ jobs: - name: Build CSS run: npm run build-css + - name: Build JS + run: npm run build-js + - name: Setup | Rust uses: dtolnay/rust-toolchain@master with: @@ -303,6 +306,9 @@ jobs: - name: Build CSS run: npm run build-css + - name: Build JS + run: npm run build-js + - name: Setup | Rust uses: dtolnay/rust-toolchain@master with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ee813a7..19787b9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -43,6 +43,9 @@ jobs: - name: Build CSS run: npm run build-css + - name: Build JS + run: npm run build-js + - name: Check formatting run: cargo fmt -- --check @@ -106,6 +109,7 @@ jobs: run: | cargo build npm run build-css + npm run build-js - name: Cache Playwright browsers uses: actions/cache@v4 @@ -170,6 +174,9 @@ jobs: - name: Build CSS run: npm run build-css + - name: Build JS + run: npm run build-js + - name: Build run: cargo build --verbose @@ -219,6 +226,9 @@ jobs: - name: Build CSS run: npm run build-css + - name: Build JS + run: npm run build-js + - name: Generate code coverage run: cargo tarpaulin --verbose --all-features --workspace --timeout 120 --out xml diff --git a/CLAUDE.md b/CLAUDE.md index afdac82..1d23629 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -21,6 +21,10 @@ make build # Includes CSS compilation make css npm run build-css +# Build JS only +make js +npm run build-js + # Build specific workspace member cargo build -p cookcli @@ -61,6 +65,12 @@ npm run build-css # Watch CSS changes during development npm run watch-css + +# Build JS for production +npm run build-js + +# Watch JS changes during development +npm run watch-js ``` ### Linting and Formatting diff --git a/playwright.config.ts b/playwright.config.ts index 91d134d..b102e74 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -100,7 +100,7 @@ export default defineConfig({ webServer: { command: process.env.CI ? './target/debug/cook server ./seed --port 9080' // In CI, use pre-built binary - : 'npm run build-css && cargo build && ./target/debug/cook server ./seed --port 9080', // Local dev + : 'npm run build-css && npm run build-js && cargo build && ./target/debug/cook server ./seed --port 9080', // Local dev url: 'http://localhost:9080', reuseExistingServer: !process.env.CI, timeout: 60 * 1000, // 1 minute should be enough with pre-built binary