chore: run test suite on windows (#3479)

Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
Sandro Circi
2025-04-10 11:41:23 +02:00
committed by GitHub
parent 81b46ab880
commit 8c68af5e3b
6 changed files with 16 additions and 9 deletions

View File

@@ -42,6 +42,8 @@ jobs:
- name: Build application
run: pnpm run docs:build
env:
NODE_OPTIONS: '--max-old-space-size=8192'
- name: Deploy to NuxtHub
uses: nuxt-hub/action@v1

View File

@@ -18,7 +18,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest] # macos-latest, windows-latest
os: [ubuntu-latest, windows-latest] # macos-latest
node: [22]
env:
@@ -65,6 +65,7 @@ jobs:
run: pnpm run dev:vue:build
- name: Publish
if: matrix.os != 'windows-latest'
run: pnpx pkg-pr-new publish --compact --no-template --pnpm
starter-nuxt:

1
.npmrc
View File

@@ -1,4 +1,3 @@
shamefully-hoist=true
auto-install-peers=true
ignore-workspace-root-check=true
shell-emulator=true

View File

@@ -6,8 +6,13 @@ export default defineBuildConfig({
'./src/unplugin',
'./src/vite'
],
rollup: {
replace: {
'process.env.DEV': 'false'
delimiters: ['', ''],
values: {
'process.argv.at(-1) === \'--uiDev\'': 'false'
}
}
},
hooks: {
'mkdist:entry:options'(ctx, entry, options) {

View File

@@ -96,13 +96,13 @@
"scripts": {
"build": "nuxt-module-build build",
"prepack": "pnpm build",
"dev": "DEV=true nuxi dev playground",
"dev": "nuxi dev playground --uiDev",
"dev:build": "nuxi build playground",
"dev:vue": "DEV=true vite playground-vue",
"dev:vue": "vite playground-vue -- --uiDev",
"dev:vue:build": "vite build playground-vue",
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground && nuxi prepare docs && vite build playground-vue",
"docs": "DEV=true nuxi dev docs",
"docs:build": "NODE_OPTIONS='--max-old-space-size=8192' nuxi build docs",
"docs": "nuxi dev docs --uiDev",
"docs:build": "nuxi build docs",
"docs:prepare": "nuxt-component-meta docs",
"lint": "eslint .",
"lint:fix": "eslint . --fix",

View File

@@ -50,7 +50,7 @@ export function getTemplates(options: ModuleOptions, uiConfig: Record<string, an
}
// For local development, import directly from theme
if (process.env.DEV) {
if (process.argv.at(-1) === '--uiDev') {
const templatePath = fileURLToPath(new URL(`./theme/${kebabCase(component)}`, import.meta.url))
return [
`import template from ${JSON.stringify(templatePath)}`,