Skip to content

Commit

Permalink
fix(dist): fix styles distribution
Browse files Browse the repository at this point in the history
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
  • Loading branch information
stasson committed May 1, 2018
1 parent b2bff9e commit fd1d66a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 deletions.
22 changes: 5 additions & 17 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ Vue.use(VueMDCButton)
</script>
```

#### 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.
Expand Down Expand Up @@ -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
Expand All @@ -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')
]
}
```
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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:**",
Expand Down

0 comments on commit fd1d66a

Please sign in to comment.