2023-01-13 18:57:31 +00:00
|
|
|
import { defineNuxtModule } from '@nuxt/kit'
|
|
|
|
import { check } from 'stale-dep'
|
|
|
|
|
|
|
|
export default defineNuxtModule({
|
|
|
|
meta: {
|
|
|
|
name: 'stale-dep',
|
2023-02-08 09:51:16 +00:00
|
|
|
configKey: 'staleDep',
|
2023-01-13 18:57:31 +00:00
|
|
|
},
|
2023-02-08 09:51:16 +00:00
|
|
|
defaults: {
|
2023-02-09 12:01:22 +00:00
|
|
|
enabled: process.env.NODE_ENV !== 'test',
|
2023-02-08 09:51:16 +00:00
|
|
|
},
|
|
|
|
setup(opts) {
|
|
|
|
if (opts.enabled)
|
|
|
|
return check('pnpm')
|
2023-01-13 18:57:31 +00:00
|
|
|
},
|
|
|
|
})
|