diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 99cbefd..f811214 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,10 +19,15 @@ jobs: - uses: actions/setup-node@v3 with: node-version: '16' - cache: yarn - - run: yarn install - - run: yarn dev:prepare - - run: yarn lint - - run: yarn prepack - - run: yarn dev:generate - - run: yarn test + - uses: pnpm/action-setup@v2.2.2 + name: Install pnpm + id: pnpm-install + with: + version: 7 + run_install: false + - run: pnpm install + - run: pnpm dev:prepare + - run: pnpm lint + - run: pnpm prepack + - run: pnpm dev:generate + - run: pnpm test diff --git a/.gitignore b/.gitignore index 4994002..7fc427f 100644 --- a/.gitignore +++ b/.gitignore @@ -9,10 +9,6 @@ node_modules .tmp .cache -# Yarn -**/.yarn/cache -**/.yarn/*state* - # Generated dirs dist diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..bf2e764 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +shamefully-hoist=true diff --git a/README.md b/README.md index 11adcec..80dcafa 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,9 @@ 1. Add `nuxt-component-meta` dependency to your project: ```bash -# Using Yarn -yarn add --dev nuxt-component-meta +# Using PNPM +pnpm add -D nuxt-component-meta + # Using NPM npm install --save-dev nuxt-component-meta ``` @@ -43,5 +44,5 @@ const { data: meta } = await useAsyncData('my-component', () => $fetch('/api/com ## Development 1. Clone this repository -2. Install dependencies using `yarn install` -3. Start dev server using `yarn dev` +2. Install dependencies using `pnpm install` +3. Start dev server using `pnpm dev` diff --git a/package.json b/package.json index a931acf..3817570 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nuxt-component-meta", - "version": "0.2.3", + "version": "0.3.2", "license": "MIT", "type": "module", "exports": { @@ -19,25 +19,43 @@ "dev": "nuxi dev playground", "dev:build": "nuxi build playground", "dev:generate": "nuxi generate playground", - "dev:prepare": "nuxt-module-build --stub && yarn install --cwd ./playground && nuxi prepare playground", + "dev:prepare": "nuxt-module-build --stub && nuxi prepare playground", "lint": "eslint --ext .js,.ts,.vue .", "test": "vitest", - "release": "yarn test && standard-version && git push --follow-tags && npm publish" + "release": "pnpm test && standard-version && git push --follow-tags && npm publish" }, "dependencies": { - "@nuxt/kit": "^3.0.0-rc.10", + "@nuxt/kit": "^3.0.0-rc.12", "scule": "^0.3.2", - "vue-component-meta": "^0.40.13" + "vue-component-meta": "^1.0.8" }, "devDependencies": { "@iconify/vue": "^4.0.0", + "@nuxt/content": "^2.1.1", "@nuxt/module-builder": "latest", - "@nuxt/test-utils": "^3.0.0-rc.10", + "@nuxt/test-utils": "^3.0.0-rc.12", "@nuxtjs/eslint-config-typescript": "latest", - "@nuxt/content": "npm:@nuxt/content-edge@latest", "eslint": "latest", - "nuxt": "^3.0.0-rc.10", + "nuxt": "^3.0.0-rc.12", "standard-version": "^9.5.0", - "vitest": "^0.23.4" + "typescript": "^4.8.4", + "vitest": "^0.24.3", + "vue": "^3.2.41" + }, + "build": { + "externals": [ + "#nuxt-component-meta", + "ufo", + "pathe", + "defu", + "unplugin" + ] + }, + "pnpm": { + "peerDependencyRules": { + "ignoreMissing": [ + "postcss*" + ] + } } } diff --git a/playground/app.vue b/playground/app.vue index 2b81925..afbca3b 100644 --- a/playground/app.vue +++ b/playground/app.vue @@ -1,14 +1,31 @@ - diff --git a/playground/components/TestComponent.vue b/playground/components/TestComponent.vue index a767229..b9bfcb6 100644 --- a/playground/components/TestComponent.vue +++ b/playground/components/TestComponent.vue @@ -1,16 +1,23 @@ diff --git a/playground/components/content/TestContent.vue b/playground/components/content/TestContent.vue new file mode 100644 index 0000000..b282a4c --- /dev/null +++ b/playground/components/content/TestContent.vue @@ -0,0 +1,5 @@ + diff --git a/playground/components/global/TestGlobalComponent.vue b/playground/components/global/TestGlobalComponent.vue index 65ed3c3..573d0ee 100644 --- a/playground/components/global/TestGlobalComponent.vue +++ b/playground/components/global/TestGlobalComponent.vue @@ -1,3 +1,7 @@ diff --git a/playground/components/pinceau/TestPinceau.vue b/playground/components/pinceau/TestPinceau.vue new file mode 100644 index 0000000..6e4e32d --- /dev/null +++ b/playground/components/pinceau/TestPinceau.vue @@ -0,0 +1,26 @@ + + + + + diff --git a/playground/components/testTyped.vue b/playground/components/testTyped.vue index 6f6c1fc..9fa8153 100644 --- a/playground/components/testTyped.vue +++ b/playground/components/testTyped.vue @@ -1,5 +1,8 @@