diff --git a/template/_package.json b/template/_package.json index 16fe9cad3..5aff4267c 100644 --- a/template/_package.json +++ b/template/_package.json @@ -94,7 +94,7 @@ }, "devDependencies": { <%_ if (ui === 'tailwind') { _%> - "tailwindcss": "^1.0.0", + "@nuxtjs/tailwindcss": "^1.0.0", <%_ } else if (ui === 'vuetify') { _%> "stylus": "^0.54.5", "stylus-loader": "^3.0.2", diff --git a/template/frameworks/tailwind/assets/css/tailwind.css b/template/frameworks/tailwind/assets/css/tailwind.css deleted file mode 100644 index b5c61c956..000000000 --- a/template/frameworks/tailwind/assets/css/tailwind.css +++ /dev/null @@ -1,3 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; diff --git a/template/frameworks/tailwind/tailwind.config.js b/template/frameworks/tailwind/tailwind.config.js deleted file mode 100644 index 4c14a383d..000000000 --- a/template/frameworks/tailwind/tailwind.config.js +++ /dev/null @@ -1,7 +0,0 @@ -// See default config https://github.com/tailwindcss/tailwindcss/blob/master/stubs/defaultConfig.stub.js -module.exports = { - theme: { - extend: {} - }, - variants: {} -} diff --git a/template/nuxt/nuxt.config.js b/template/nuxt/nuxt.config.js index b33f8a028..397199ed0 100644 --- a/template/nuxt/nuxt.config.js +++ b/template/nuxt/nuxt.config.js @@ -55,8 +55,6 @@ module.exports = { css: [ <%_ if (ui === 'element-ui') { _%> 'element-ui/lib/theme-chalk/index.css' - <%_ } else if (ui === 'tailwind') { _%> - '~/assets/css/tailwind.css' <%_ } else if (ui === 'iview') { _%> 'iview/dist/styles/iview.css' <%_ } else if (ui === 'ant-design-vue') { _%> @@ -104,6 +102,14 @@ module.exports = { '@nuxtjs/eslint-module', <%_ } _%> ], + <%_ if (ui === 'tailwind') { _%> + /* + ** Nuxt.js dev-modules + */ + devModules: [ + '@nuxtjs/tailwindcss' + ], + <%_ } _%> <%_ if (axios) { _%> /* ** Axios module configuration @@ -143,12 +149,6 @@ module.exports = { }, <%_ } else if (ui === 'element-ui') { _%> transpile: [/^element-ui/], - <%_ } else if (ui === 'tailwind') { _%> - postcss: { - plugins: { - tailwindcss: './tailwind.config.js' - } - }, <%_ } _%> /* ** You can extend webpack config here diff --git a/test/snapshots/index.test.js.md b/test/snapshots/index.test.js.md index 1a3a3b960..0598e6fa2 100644 --- a/test/snapshots/index.test.js.md +++ b/test/snapshots/index.test.js.md @@ -2666,7 +2666,6 @@ Generated by [AVA](https://ava.li). '.gitignore', 'README.md', 'assets/README.md', - 'assets/css/tailwind.css', 'components/Logo.vue', 'components/README.md', 'layouts/README.md', @@ -2680,7 +2679,6 @@ Generated by [AVA](https://ava.li). 'static/README.md', 'static/favicon.ico', 'store/README.md', - 'tailwind.config.js', ] > package.json @@ -2690,8 +2688,8 @@ Generated by [AVA](https://ava.li). nuxt: '^2.0.0', }, devDependencies: { + '@nuxtjs/tailwindcss': '^1.0.0', nodemon: '^1.18.9', - tailwindcss: '^1.0.0', }, private: true, scripts: { @@ -2729,7 +2727,6 @@ Generated by [AVA](https://ava.li). ** Global CSS␊ */␊ css: [␊ - '~/assets/css/tailwind.css'␊ ],␊ /*␊ ** Plugins to load before mounting the App␊ @@ -2742,14 +2739,15 @@ Generated by [AVA](https://ava.li). modules: [␊ ],␊ /*␊ + ** Nuxt.js dev-modules␊ + */␊ + devModules: [␊ + '@nuxtjs/tailwindcss'␊ + ],␊ + /*␊ ** Build configuration␊ */␊ build: {␊ - postcss: {␊ - plugins: {␊ - tailwindcss: './tailwind.config.js'␊ - }␊ - },␊ /*␊ ** You can extend webpack config here␊ */␊ diff --git a/test/snapshots/index.test.js.snap b/test/snapshots/index.test.js.snap index 192d6fd36..7f9924650 100644 Binary files a/test/snapshots/index.test.js.snap and b/test/snapshots/index.test.js.snap differ