Skip to content

Commit

Permalink
chore: add module to playground as a dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
johannschopplich committed Apr 20, 2024
1 parent 5d56e05 commit 83e8302
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 13 deletions.
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,5 @@
"typescript": "^5.4.5",
"vitest": "^1.5.0",
"vue-tsc": "^2.0.13"
},
"resolutions": {
"nuxt-api-party": "link:."
}
}
6 changes: 1 addition & 5 deletions playground/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import { existsSync } from 'node:fs'
import { resolve } from 'pathe'
import { defineNuxtConfig } from 'nuxt/config'

export default defineNuxtConfig({
modules: [
existsSync(resolve(__dirname, '../dist/module.mjs')) ? 'nuxt-api-party' : '../src/module',
],
modules: ['nuxt-api-party'],

apiParty: {
endpoints: {
Expand Down
3 changes: 3 additions & 0 deletions playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@
"dev": "nuxi dev",
"build": "nuxi build",
"generate": "nuxi generate"
},
"dependencies": {
"nuxt-api-party": "workspace:"
}
}
9 changes: 5 additions & 4 deletions pnpm-lock.yaml

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

2 changes: 1 addition & 1 deletion src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export default defineNuxtModule<ModuleOptions>({
!Object.keys(options.endpoints!).length
&& !nuxt.options.runtimeConfig.apiParty
)
logger.error('Missing any API endpoint configuration. Please check the `apiParty` module configuration in `nuxt.config.ts`.')
logger.error('Missing API endpoints configuration. Please check the `apiParty` module configuration in `nuxt.config.ts`.')

// Private runtime config
// eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error, @typescript-eslint/ban-ts-comment
Expand Down

0 comments on commit 83e8302

Please sign in to comment.