From fd1d66a12fc08e896cbf835ca5041c58603aaa6a Mon Sep 17 00:00:00 2001 From: stasson Date: Tue, 1 May 2018 09:36:41 +0200 Subject: [PATCH] fix(dist): fix styles distribution copy missing sccs files to the distribution BREAKING CHANGE: styles are not located in 'vue-mdc-adapter/dist/components/...' anymore. import them from 'vue-mdc-adapter/dist/...' closes #423 --- docs/getting-started.md | 22 +++++----------------- package.json | 2 +- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/docs/getting-started.md b/docs/getting-started.md index 33e119f5..e5afb98a 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -176,7 +176,7 @@ Vue.use(VueMDCButton) ``` -#### Create your own SASS Theme +### Create your own SASS Theme > Material Components styles come as highly themable SASS framework. In order to be able to theme properly > and avoid any duplicate/ordering style issues in the bundle, we recommend managing styles globally. @@ -231,17 +231,6 @@ $mdc-theme-background: #fff; > You may want to optimize your build and leverage the source distribution. -#### Resolve vue-mdc-adapter sources - -```javascript - // webpack.config.js - resolve: { - alias: { - 'vue-mdc-adapter': 'vue-mdc-adapter/components', - } - } -``` - #### Make sure @material imports are transpiled ```javascript @@ -250,8 +239,7 @@ $mdc-theme-background: #fff; test: /\.js$/, loader: 'babel-loader', include: [ - path.resolve(__dirname, 'node_modules/@material'), - path.resolve(__dirname, 'node_modules/vue-mdc-adapter') + path.resolve(__dirname, 'node_modules/@material') ] } ``` @@ -277,7 +265,7 @@ $mdc-theme-primary: #212121; $mdc-theme-accent: #41b883; $mdc-theme-background: #fff; -@import 'vue-mdc-adapter/components/styles.scss'; +@import 'vue-mdc-adapter/styles'; ``` ```javascript @@ -296,8 +284,8 @@ $mdc-theme-primary: #212121; $mdc-theme-accent: #41b883; $mdc-theme-background: #fff; -@import 'vue-mdc-adapter/components/button/styles.scss'; -@import 'vue-mdc-adapter/components/fab/styles.scss'; +@import 'vue-mdc-adapter/button/styles'; +@import 'vue-mdc-adapter/fab/styles'; ``` ```javascript diff --git a/package.json b/package.json index 619c5a28..3239b0fa 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "test": "jest --runInBand", "testnc": "NODE_ENV=test; jest --runInBand --no-cache", "build": "run-s build:**", - "build:copy": "copyup components/styles.scss components/*/styles.scss dist", + "build:copy": "copyfiles -u 1 components/**/*.scss dist", "build:demo": "cross-env NODE_ENV=production webpack", "build:dist": "rollup -c", "lint": "run-s lint:**",