Skip to content

Commit

Permalink
feat(nuxt): add @vueuse/core and @vueuse/nuxt dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
productdevbook committed Jan 17, 2024
1 parent 6dd90de commit 4b46216
Show file tree
Hide file tree
Showing 4 changed files with 103 additions and 19 deletions.
2 changes: 2 additions & 0 deletions packages/box/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
"@tailwindcss/forms": "^0.5.7",
"@tailwindcss/typography": "^0.5.10",
"@vee-validate/zod": "^4.12.4",
"@vueuse/core": "^10.7.2",
"@vueuse/nuxt": "^10.7.2",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.0",
"notivue": "^2.0.1",
Expand Down
22 changes: 13 additions & 9 deletions packages/nuxt/src/runtime/modules/box/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,17 @@ export default definePergelModule<BoxOptions, ResolvedBoxOptions>({
},
defaults: {
packages: {
colorMode: true,
notivue: true,
nuxtIcon: true,
radixVue: true,
colorMode: false,
notivue: false,
nuxtIcon: false,
radixVue: false,
tailwindIcon: ['ph', 'carbon'],
tailwindcss: true,
veeValidate: true,
zod: true,
i18n: true,
pinia: true,
tailwindcss: false,
veeValidate: false,
zod: false,
i18n: false,
pinia: false,
vueUse: false,
},
},
async setup({ nuxt, options }) {
Expand Down Expand Up @@ -305,6 +306,9 @@ export default definePergelModule<BoxOptions, ResolvedBoxOptions>({
if (options.packages.pinia)
await installModule('@pinia/nuxt')

if (options.packages.vueUse)
await installModule('@vueuse/nuxt')

addDownloadTemplate({
nuxt,
data: {
Expand Down
7 changes: 7 additions & 0 deletions packages/nuxt/src/runtime/modules/box/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ export interface BoxOptions extends PergelModuleOptions {
* @see https://pinia.vuejs.org
*/
pinia?: boolean

/**
* @default true
* @see https://vueuse.org
*/
vueUse?: boolean
}

}
Expand All @@ -79,5 +85,6 @@ export interface ResolvedBoxOptions extends ResolvedPergelModuleOptions {
veeValidate?: boolean
i18n?: boolean
pinia?: boolean
vueUse?: boolean
}
}
91 changes: 81 additions & 10 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4b46216

Please sign in to comment.