You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**BREAKING CHANGE:**`node-sass` has been changed from a direct dependency to a [peer dependency](https://nodejs.org/es/blog/npm/peer-dependencies/). If you are upgrading from v1.x.x, you may need to install it directly in your project using `npm install --save node-sass`.
8
+
9
+
* Changed `node-sass` to a peer dependency. This gives you direct control over which version of `node-sass` you want to use in your project going forward. No more waiting for metalsmith-sass releases!
10
+
* Upgraded dependencies and resolved vulnerabilities.
11
+
* Remove test files from npm distribution.
12
+
* Enable support for all versions of Node.js supported by node-sass. Going forward, whichever version of node-sass you install will determine your Node.js support. See [node-sass' version support policy](https://github.com/sass/node-sass#node-version-support-policy) for details.
> Note: As of [v2.0](https://github.com/stevenschobert/metalsmith-sass/releases/v2.0.0), `node-sass` is listed as a peer dependency, and will need to be installed alongside metalsmith-sass as shown above.
15
+
14
16
## Getting Started
15
17
16
18
If you haven't checked out [Metalsmith](http://metalsmith.io/) before, head over to their website and check out the
@@ -37,7 +39,7 @@ If you are using the JS Api for Metalsmith, then you can require the module and
37
39
`.use()` directives:
38
40
39
41
```js
40
-
var sass =require('metalsmith-sass');
42
+
var sass =require("metalsmith-sass");
41
43
42
44
metalsmith.use(sass({
43
45
outputStyle:"expanded"
@@ -52,7 +54,7 @@ In addition to the options that node-sass provides, metalsmith-sass provides the
52
54
53
55
### outputDir
54
56
55
-
Change the base folder path styles are outputed to. You can use this in combination with
57
+
Change the base folder path styles are output to. You can use this in combination with
56
58
Metalsmith's `destination` option to control where styles end up after the build.
57
59
58
60
The final output directory is equal to `Metalsmith.destination() + outputDirOption`. For example,
@@ -63,7 +65,7 @@ Metalsmith()
63
65
.source("src/")
64
66
.destination("build/")
65
67
.use(sass({
66
-
outputDir:'css/'// This changes the output dir to "build/css/" instead of "build/scss/"
68
+
outputDir:"css/"// This changes the output dir to "build/css/" instead of "build/scss/"
67
69
}))
68
70
.build(function () {
69
71
done();
@@ -75,11 +77,11 @@ As of version [v1.1](https://github.com/stevenschobert/metalsmith-sass/releases/
75
77
This is useful if you want to preserve your folder structure, but change just one folder name.
76
78
77
79
```js
78
-
Metalsmith()
80
+
Metalsmith(__dirname)
79
81
.source("src/")
80
82
.destination("build/")
81
83
.use(sass({
82
-
outputDir:function(originalPath) {
84
+
outputDir:function(originalPath) {
83
85
// this will change scss/some/path to css/some/path
84
86
returnoriginalPath.replace("scss", "css");
85
87
}
@@ -94,7 +96,7 @@ Metalsmith()
94
96
The easiest way to enable source maps in your metalsmith project is to add the following options:
0 commit comments