diff --git a/.github/workflows/release-nuxt-ui-preset.yaml b/.github/workflows/release-nuxt-ui-preset.yaml new file mode 100644 index 0000000..e562db7 --- /dev/null +++ b/.github/workflows/release-nuxt-ui-preset.yaml @@ -0,0 +1,68 @@ +name: Release (preset-nuxt-ui) + +on: + pull_request: + branches: [main] + push: + branches: [main] + tags: + - 'v*' + +jobs: + release: + name: Release preset + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup git user + run: | + git config --global user.name "$(git --no-pager log --format=format:'%an' -n 1)" + git config --global user.email "$(git --no-pager log --format=format:'%ae' -n 1)" + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '22' + registry-url: 'https://registry.npmjs.org' + + - name: Cache pnpm modules + uses: actions/cache@v4 + with: + path: ~/.pnpm-store + key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}- + + - uses: pnpm/action-setup@v4 + with: + version: 9 + run_install: true + + - name: Build preset + working-directory: packages/preset-nuxt-ui + run: pnpm build + + - name: Extract version from tag + if: github.ref_type == 'tag' + run: echo "PKG_VERSION=${GITHUB_REF_NAME#nuxt-ui-preset-}" >> $GITHUB_ENV + + - name: Set version in package.json + if: github.ref_type == 'tag' + working-directory: packages/preset-nuxt-ui + run: pnpm version "${PKG_VERSION}" --no-commit-hooks --no-git-tag-version + + - name: Publish to npm + if: github.ref_type == 'tag' + working-directory: packages/preset-nuxt-ui + run: pnpm version "${PKG_VERSION}" --no-commit-hooks --no-git-tag-version + + - name: Publish to npm + if: github.ref_type == 'tag' + working-directory: packages/preset-nuxt-ui + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + run: pnpm publish --no-git-checks --access public diff --git a/.gitignore b/.gitignore index b3dbcd0..6930d5a 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,7 @@ test-results/ playwright-report/ .vite/ + +# Auto-generated type declarations +auto-imports.d.ts +components.d.ts diff --git a/packages/playground/index.html b/packages/playground/index.html index fe01e2a..13c45c2 100644 --- a/packages/playground/index.html +++ b/packages/playground/index.html @@ -6,7 +6,7 @@ Former Playground -
+
diff --git a/packages/playground/package.json b/packages/playground/package.json index 896e5c9..87367cc 100644 --- a/packages/playground/package.json +++ b/packages/playground/package.json @@ -12,11 +12,16 @@ "preview": "vite preview" }, "dependencies": { + "@former-ui/preset-nuxt-ui": "workspace:*", + "@nuxt/ui": "3.3.4", + "@unhead/vue": "2.0.19", "@vueuse/core": "12.0.0", "former-ui": "workspace:*", - "vue": "^3.5.13" + "vue": "3.5.13", + "vue-router": "4.5.1" }, "devDependencies": { + "@tailwindcss/postcss": "^4.1.13", "@tsconfig/node22": "22.0.0", "@types/lodash": "4.17.13", "@types/node": "22.10.1", @@ -24,9 +29,9 @@ "@vue/tsconfig": "0.7.0", "@vueuse/core": "12.0.0", "autoprefixer": "10.4.20", - "tailwindcss": "3.4.16", + "tailwindcss": "4.1.13", "typescript": "5.7.2", - "vite": "6.1.6", + "vite": "^6.1.6", "vite-plugin-css-injected-by-js": "3.5.2", "vitest": "2.1.9", "vue": "3.5.13", diff --git a/packages/playground/src/App.vue b/packages/playground/src/App.vue index 3357a29..2b1c5eb 100644 --- a/packages/playground/src/App.vue +++ b/packages/playground/src/App.vue @@ -1,7 +1,5 @@ - - diff --git a/packages/playground/src/Playground.vue b/packages/playground/src/Playground.vue index 6cbfb76..347ff85 100644 --- a/packages/playground/src/Playground.vue +++ b/packages/playground/src/Playground.vue @@ -3,15 +3,15 @@
-

+

👩🏾‍🌾 Former playground

@@ -27,7 +27,8 @@ Data {{ isValid ? 'valid' : 'invalid' }}, Schema {{ isSchemaValid ? 'valid' : 'invalid' }} - +