Skip to content

Commit

Permalink
chore(#1): add example frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
Decipher committed Sep 10, 2022
1 parent 0df2716 commit 2715cfc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
3 changes: 2 additions & 1 deletion example/nuxt/nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ const baseUrl = process.env.GITPOD_WORKSPACE_ID

export default {
buildModules: [
'druxt',
'druxt-entity',
'druxt-router/nuxt',
'@druxt-contrib/layout-builder'
],
druxt: { baseUrl }
Expand Down
3 changes: 2 additions & 1 deletion example/nuxt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
},
"dependencies": {
"@druxt-contrib/layout-builder": "link:../..",
"druxt": "latest",
"druxt-entity": "latest",
"druxt-router": "latest",
"nuxt": "latest"
}
}
13 changes: 9 additions & 4 deletions example/nuxt/pages/index.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
<template>
<div>
<h1>Druxt Module component example</h1>
<DruxtModuleComponent />
</div>
<DruxtRouter path="/node/1">
<template #default="{ route }">
<DruxtEntity v-bind="route.props">
<template #default="{ entity }">
<DruxtLayoutBuilder :entity="entity" />
</template>
</DruxtEntity>
</template>
</DruxtRouter>
</template>

0 comments on commit 2715cfc

Please sign in to comment.