diff --git a/examples/with-vuetify/README.md b/examples/with-vuetify/README.md index 0532d12036..95e7cf7f72 100644 --- a/examples/with-vuetify/README.md +++ b/examples/with-vuetify/README.md @@ -6,5 +6,6 @@ https://nuxt-with-vuetify-example.surge.sh ## Resources -https://nuxtjs.org/examples/with-vuetify
+https://github.com/nuxt-community/vuetify-module +https://nuxtjs.org/examples/with-vuetify https://vuetifyjs.com/ diff --git a/examples/with-vuetify/assets/app.styl b/examples/with-vuetify/assets/app.styl deleted file mode 100644 index 784fd9c898..0000000000 --- a/examples/with-vuetify/assets/app.styl +++ /dev/null @@ -1,27 +0,0 @@ -// Specify overrides (theme and/or base variables etc.) -// See https://vuetifyjs.com/quick-start -// And for themes customizing: https://vuetifyjs.com/style/theme - -// Color Palette: https://vuetifyjs.com/style/colors - -// Although, since version https://github.com/vuetifyjs/vuetify/releases/tag/v0.17.0, colors are no -// longer defined **explicitly** in the stylus files. -// you can use `import colors from 'vuetify/es5/util/colors'` in the vuetify instance, under `plugins` -// if you only want to define your color palette. - -// you have to define the same palette colors just if you want to use them inside your own stylus files. - -@require '~vuetify/src/stylus/settings/_colors' - -$theme := { - primary: $red.darken-2 - accent: $red.accent-2 - secondary: $grey.lighten-1 - info: $blue.lighten-1 - warning: $amber.darken-2 - error: $red.accent-4 - success: $green.lighten-2 -} - -// Import Vuetify styling -@require '~vuetify/src/stylus/main' diff --git a/examples/with-vuetify/assets/variabales.scss b/examples/with-vuetify/assets/variabales.scss new file mode 100644 index 0000000000..de57b59bc3 --- /dev/null +++ b/examples/with-vuetify/assets/variabales.scss @@ -0,0 +1 @@ +// https://github.com/nuxt-community/vuetify-module#customvariables \ No newline at end of file diff --git a/examples/with-vuetify/layouts/default.vue b/examples/with-vuetify/layouts/default.vue index a68bb18765..b27114a7bd 100644 --- a/examples/with-vuetify/layouts/default.vue +++ b/examples/with-vuetify/layouts/default.vue @@ -1,41 +1,103 @@ + + - - diff --git a/examples/with-vuetify/nuxt.config.js b/examples/with-vuetify/nuxt.config.js index f13447cd02..3b4ca4c33a 100644 --- a/examples/with-vuetify/nuxt.config.js +++ b/examples/with-vuetify/nuxt.config.js @@ -1,5 +1,3 @@ -import VuetifyLoaderPlugin from 'vuetify-loader/lib/plugin' - export default { /* ** Head elements @@ -14,18 +12,14 @@ export default { } ] }, - build: { - plugins: [new VuetifyLoaderPlugin()], - extractCSS: true, - transpile: ['vuetify/lib'] + extractCSS: true }, - /* - ** Load Vuetify into the app - */ - plugins: ['~/plugins/vuetify'], - /* - ** Load Vuetify CSS globally - */ - css: ['~/assets/app.styl'] + buildModules: [ + '@nuxtjs/vuetify' + ], + vuetify: { + customVariables: ['~/assets/variables.scss'], + optionsPath: './vuetify.options.js' + } } diff --git a/examples/with-vuetify/package.json b/examples/with-vuetify/package.json index 3e6d3b281a..3ab8546365 100644 --- a/examples/with-vuetify/package.json +++ b/examples/with-vuetify/package.json @@ -1,9 +1,7 @@ { "name": "example-with-vuetify", "dependencies": { - "nuxt": "latest", - "vuetify": "latest", - "vuetify-loader": "latest" + "nuxt": "latest" }, "scripts": { "dev": "nuxt", @@ -13,7 +11,6 @@ "post-update": "yarn upgrade --latest" }, "devDependencies": { - "stylus": "^0.54.5", - "stylus-loader": "^3.0.1" + "@nuxtjs/vuetify": "^1.11.2" } } diff --git a/examples/with-vuetify/pages/index.vue b/examples/with-vuetify/pages/index.vue index 3e2d64d81c..2207025352 100644 --- a/examples/with-vuetify/pages/index.vue +++ b/examples/with-vuetify/pages/index.vue @@ -1,14 +1,11 @@ diff --git a/examples/with-vuetify/plugins/vuetify.js b/examples/with-vuetify/plugins/vuetify.js deleted file mode 100644 index 12bb590ca4..0000000000 --- a/examples/with-vuetify/plugins/vuetify.js +++ /dev/null @@ -1,19 +0,0 @@ -import Vue from 'vue' -import Vuetify from 'vuetify/lib' -import colors from 'vuetify/es5/util/colors' - -// You can also specify those components you are going to use for "a la carte" build: -// https://github.com/vuetifyjs/nuxt/blob/master/template/plugins/vuetify.js -// https://github.com/vuetifyjs/a-la-carte/blob/master/template/src/main.js - -Vue.use(Vuetify, { - theme: { - primary: '#9c27b0', // a color that is not in the material colors palette - accent: colors.grey.darken3, - secondary: colors.amber.darken3, - info: colors.teal.lighten1, - warning: colors.amber.darken2, - error: colors.deepOrange.accent4, - success: colors.green.accent3 - } -}) diff --git a/examples/with-vuetify/vuetify.options.js b/examples/with-vuetify/vuetify.options.js new file mode 100644 index 0000000000..5fba530392 --- /dev/null +++ b/examples/with-vuetify/vuetify.options.js @@ -0,0 +1,13 @@ +import colors from 'vuetify/es5/util/colors' + +export default { + theme: { + dark: true, + themes: { + dark: { + primary: colors.red.base, + test: colors.blue.base + } + } + } +}