Skip to content

Commit f369792

Browse files
authoredJan 18, 2024
fix: fix prepare command
1 parent 2bca37a commit f369792

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed
 

Diff for: ‎.github/workflows/ci.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ jobs:
1818
with:
1919
node-version: 20
2020
cache: "pnpm"
21-
- run: pnpm install
22-
- run: pnpm dev:prepare
21+
- run: pnpm install && pnpm dev:prepare
2322
# - run: pnpm lint
2423
- run: pnpm test
2524
- run: pnpm build

Diff for: ‎.github/workflows/nightly.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
registry-url: "https://registry.npmjs.org/"
2424
cache: "pnpm"
2525

26-
- run: pnpm install && pnpm build
26+
- run: pnpm install && pnpm dev:prepare && pnpm build
2727
- run: pnpm changelogen --bump --canary --publish --publishTag nightly --from $(git log -n 1 --pretty=format:%H -- CHANGELOG.md)
2828
env:
2929
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

Diff for: ‎package.json

+7-4
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@
2222
"dist"
2323
],
2424
"scripts": {
25-
"dev": "nuxi dev playground",
2625
"play": "pnpm dev",
27-
"prepare": "nuxt-module-build prepare && nuxt-module-build build --stub",
26+
"prepare": "nuxt-module-build prepare",
27+
"dev": "nuxi dev playground",
2828
"dev:build": "nuxi build playground",
2929
"dev:generate": "nuxi generate playground",
3030
"dev:nuxt2": "nuxi dev nuxt2-playground",
31-
"dev:prepare": "pnpm prepare",
31+
"dev:prepare": "pnpm prepare && pnpm build:stub",
3232
"build": "nuxt-module-build build",
33+
"build:stub": "pnpm build --stub",
3334
"prepack": "pnpm build",
34-
"prepublishOnly": "pnpm build",
3535
"release": "pnpm lint && pnpm test && pnpm prepack && pnpm changelogen --release --push && pnpm publish",
3636
"docs:build": "nuxi generate docs",
3737
"docs:preview": "nuxi preview docs",
@@ -80,5 +80,8 @@
8080
"packageManager": "pnpm@8.14.1",
8181
"resolutions": {
8282
"@nuxtjs/tailwindcss": "link:."
83+
},
84+
"stackblitz": {
85+
"startCommand": "pnpm dev:prepare && pnpm dev"
8386
}
8487
}

Diff for: ‎playground/nuxt.config.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
import { existsSync } from 'node:fs'
2+
import { resolve } from 'pathe'
3+
14
export default defineNuxtConfig({
25
extends: ['./theme'],
36
modules: [
47
'@nuxt/content',
5-
'@nuxtjs/tailwindcss',
8+
existsSync(resolve(__dirname, '../dist/module.mjs')) ? '@nuxtjs/tailwindcss' : '../src/module',
69
'@nuxt/devtools'
710
],
811
tailwindcss: {

0 commit comments

Comments
 (0)