Skip to content

Commit beecccc

Browse files
version 2.0.0
- changed node-sass to peer dependency - upgraded all outdated dependencies - removed test files from npm packaging - updated readme and changelog
1 parent 1aa6cee commit beecccc

File tree

5 files changed

+6625
-709
lines changed

5 files changed

+6625
-709
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Changelog
22

3+
## [v2.0.0](https://github.com/stevenschobert/metalsmith-sass/releases/tag/v2.0.0)
4+
5+
_01/06/2022_
6+
7+
**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.
13+
314
## [v1.7.0](https://github.com/stevenschobert/metalsmith-sass/releases/tag/v1.7.0)
415

516
_11/21/2019_

README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
metalsmith-sass
22
===============
33

4-
[![Build Status](https://travis-ci.org/stevenschobert/metalsmith-sass.svg?branch=master)](https://travis-ci.org/stevenschobert/metalsmith-sass)
4+
[![Build Status](https://app.travis-ci.com/stevenschobert/metalsmith-sass.svg?branch=master)](https://app.travis-ci.com/stevenschobert/metalsmith-sass)
55

66
A Sass plugin for Metalsmith.
77

88
## Installation
99

1010
```sh
11-
npm install --save metalsmith-sass
11+
npm install --save metalsmith-sass node-sass
1212
```
1313

14+
> 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+
1416
## Getting Started
1517

1618
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
3739
`.use()` directives:
3840

3941
```js
40-
var sass = require('metalsmith-sass');
42+
var sass = require("metalsmith-sass");
4143

4244
metalsmith.use(sass({
4345
outputStyle: "expanded"
@@ -52,7 +54,7 @@ In addition to the options that node-sass provides, metalsmith-sass provides the
5254

5355
### outputDir
5456

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
5658
Metalsmith's `destination` option to control where styles end up after the build.
5759

5860
The final output directory is equal to `Metalsmith.destination() + outputDirOption`. For example,
@@ -63,7 +65,7 @@ Metalsmith()
6365
.source("src/")
6466
.destination("build/")
6567
.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/"
6769
}))
6870
.build(function () {
6971
done();
@@ -75,11 +77,11 @@ As of version [v1.1](https://github.com/stevenschobert/metalsmith-sass/releases/
7577
This is useful if you want to preserve your folder structure, but change just one folder name.
7678

7779
```js
78-
Metalsmith()
80+
Metalsmith(__dirname)
7981
.source("src/")
8082
.destination("build/")
8183
.use(sass({
82-
outputDir: function(originalPath) {
84+
outputDir: function(originalPath) {
8385
// this will change scss/some/path to css/some/path
8486
return originalPath.replace("scss", "css");
8587
}
@@ -94,7 +96,7 @@ Metalsmith()
9496
The easiest way to enable source maps in your metalsmith project is to add the following options:
9597

9698
```js
97-
Metalsmith()
99+
Metalsmith(__dirname)
98100
.source("src/")
99101
.destination("build/")
100102
.use(sass({

0 commit comments

Comments
 (0)