Skip to content

chore: run test suite on windows #3479

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

Merged
merged 19 commits into from
Apr 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

strategy:
matrix:
os: [ubuntu-latest] # macos-latest, windows-latest
os: [ubuntu-latest, windows-latest] # macos-latest
node: [22]

env:
Expand Down Expand Up @@ -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:
Expand Down
1 change: 0 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
shamefully-hoist=true
auto-install-peers=true
ignore-workspace-root-check=true
shell-emulator=true
9 changes: 7 additions & 2 deletions build.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@ export default defineBuildConfig({
'./src/unplugin',
'./src/vite'
],
replace: {
'process.env.DEV': 'false'
rollup: {
replace: {
delimiters: ['', ''],
values: {
'process.argv.at(-1) === \'--uiDev\'': 'false'
}
}
},
hooks: {
'mkdist:entry:options'(ctx, entry, options) {
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,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",
Expand Down
2 changes: 1 addition & 1 deletion src/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)}`,
Expand Down