Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add tokens package #13

Merged
merged 12 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<NuxtLayout>
<NuxtPage />
<NuxtPage/>
</NuxtLayout>
</template>
4 changes: 2 additions & 2 deletions components/HelloWorld/HelloWorld.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import { defineComponent } from "vue";
export default defineComponent({
name: "HelloWorld",
props: {
parentMessage: String,
msg: String,
},
});
</script>

<template>
<h1>{{ parentMessage }}</h1>
<h1>{{ msg }}</h1>
</template>
5 changes: 2 additions & 3 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import vuetify from 'vite-plugin-vuetify'
import Components from 'unplugin-vue-components/vite'


export default defineNuxtConfig({
ssr: false,
modules: [
Expand All @@ -11,7 +10,7 @@ export default defineNuxtConfig({
plugins: [
'~/plugins/vuex.ts',
'~/plugins/axios.ts',
{ src: '~/plugins/vuex-persist', mode: 'client' },
{src: '~/plugins/vuex-persist', mode: 'client'},
],
build: {
transpile: ['vuetify']
Expand All @@ -20,7 +19,7 @@ export default defineNuxtConfig({
plugins: [
vuetify(),
// change the component dirs to match our project layout
Components({ dts: true, dirs: ['~/components', 'src/components'] })
Components({dts: true, dirs: ['~/components', 'src/components']})
]
},
css: [
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
"test:e2e": "cypress run",
"cypress:open": "cypress open"
},
"dependencies": {
"@cnamts/design-tokens": "2.12.0"
},
"devDependencies": {
"@babel/preset-env": "7.22.15",
"@mdi/js": "7.2.96",
Expand Down
3 changes: 2 additions & 1 deletion pages/index.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<div>
<HelloWorldBis parentMessage="Test depuis src" />
<HelloWorld msg="Un titre"/>
<HelloWorldBis parentMessage="Test depuis src"/>
</div>
</template>
15 changes: 12 additions & 3 deletions plugins/vuetify.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'vuetify/styles'
import { createVuetify } from 'vuetify'
import { aliases, mdi } from 'vuetify/iconsets/mdi-svg'
import {createVuetify} from 'vuetify'
import {aliases, mdi} from 'vuetify/iconsets/mdi-svg'
import {colorTheme} from '@cnamts/design-tokens/src/colors'

export default defineNuxtPlugin(nuxtApp => {
const vuetify = createVuetify({
Expand All @@ -11,7 +12,15 @@ export default defineNuxtPlugin(nuxtApp => {
sets: {
mdi
}
}
},
theme: {
defaultTheme: 'light',
themes: {
light: {
colors: colorTheme,
},
},
},
})

nuxtApp.vueApp.use(vuetify)
Expand Down
Loading