Skip to content

Commit

Permalink
chore: made more developable
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Milfred committed Aug 30, 2024
1 parent 9e9a69e commit 5882c73
Show file tree
Hide file tree
Showing 6 changed files with 4,015 additions and 2,836 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ module.exports = {
'no-unused-vars': ['warn'],
'no-undef': 0,
"@typescript-eslint/no-unused-vars": ["off"]
}
}
}
20 changes: 20 additions & 0 deletions .playground/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,24 @@
</template>

<script setup>
import { useNuxtApp } from '#app';
const { $umbracoClient } = useNuxtApp();
let data = await $umbracoClient.fetchData({
params: {
cache: false,
parts: ['content'],
},
route: '/',
cachingOptions: {
maxAge: 60,
name: 'getData',
getKey: ({ route }) => {
console.log(route);
return route;
},
},
});
!data && console.log('DATA:', data);
</script>
22 changes: 16 additions & 6 deletions .playground/nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,20 @@ import { defineNuxtConfig } from 'nuxt/config'
import MyModule from '..'

export default defineNuxtConfig({
modules: [
MyModule
],
myModule: {
addPlugin: true
}
modules: [
MyModule
],

myModule: {
addPlugin: true
},

runtimeConfig: {
public: {
apiDomain: 'https://10211sv-be.liveserver.nu/',
appHost: '10211sv-fe.liveserver.nu',
},
},

compatibilityDate: '2024-08-27',
})
3 changes: 3 additions & 0 deletions .playground/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "./.nuxt/tsconfig.json"
}
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,20 @@
],
"scripts": {
"prepack": "nuxt-module-build",
"dev": "nuxi dev .playground",
"dev": "yarn prepack && yarn dev:build && nuxi dev .playground",
"dev:build": "nuxi build .playground",
"dev:prepare": "nuxt-module-build --stub && nuxi prepare .playground",
"test": "exit 0"
},
"dependencies": {
"@nuxt/kit": "^3.0.0"
"@nuxt/kit": "^3.13.0"
},
"devDependencies": {
"@nuxt/module-builder": "^0.2.1",
"@nuxt/schema": "^3.0.0",
"@nuxtjs/eslint-config-typescript": "^12.0.0",
"eslint": "^8.29.0",
"nuxt": "^3.0.0"
"@nuxt/module-builder": "^0.8.3",
"@nuxt/schema": "^3.13.0",
"@nuxtjs/eslint-config-typescript": "^12.1.0",
"eslint": "^9.9.1",
"nuxt": "^3.13.0",
"typescript": "^5.5.4"
}
}
Loading

0 comments on commit 5882c73

Please sign in to comment.