Skip to content

Commit

Permalink
version 2.0.0
Browse files Browse the repository at this point in the history
- changed node-sass to peer dependency
- upgraded all outdated dependencies
- removed test files from npm packaging
- updated readme and changelog
  • Loading branch information
stevenschobert committed Jan 8, 2022
1 parent 1aa6cee commit beecccc
Show file tree
Hide file tree
Showing 5 changed files with 6,625 additions and 709 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## [v2.0.0](https://github.com/stevenschobert/metalsmith-sass/releases/tag/v2.0.0)

_01/06/2022_

**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`.

* 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!
* Upgraded dependencies and resolved vulnerabilities.
* Remove test files from npm distribution.
* 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.

## [v1.7.0](https://github.com/stevenschobert/metalsmith-sass/releases/tag/v1.7.0)

_11/21/2019_
Expand Down
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
metalsmith-sass
===============

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

A Sass plugin for Metalsmith.

## Installation

```sh
npm install --save metalsmith-sass
npm install --save metalsmith-sass node-sass
```

> 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.
## Getting Started

If you haven't checked out [Metalsmith](http://metalsmith.io/) before, head over to their website and check out the
Expand All @@ -37,7 +39,7 @@ If you are using the JS Api for Metalsmith, then you can require the module and
`.use()` directives:

```js
var sass = require('metalsmith-sass');
var sass = require("metalsmith-sass");

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

### outputDir

Change the base folder path styles are outputed to. You can use this in combination with
Change the base folder path styles are output to. You can use this in combination with
Metalsmith's `destination` option to control where styles end up after the build.

The final output directory is equal to `Metalsmith.destination() + outputDirOption`. For example,
Expand All @@ -63,7 +65,7 @@ Metalsmith()
.source("src/")
.destination("build/")
.use(sass({
outputDir: 'css/' // This changes the output dir to "build/css/" instead of "build/scss/"
outputDir: "css/" // This changes the output dir to "build/css/" instead of "build/scss/"
}))
.build(function () {
done();
Expand All @@ -75,11 +77,11 @@ As of version [v1.1](https://github.com/stevenschobert/metalsmith-sass/releases/
This is useful if you want to preserve your folder structure, but change just one folder name.

```js
Metalsmith()
Metalsmith(__dirname)
.source("src/")
.destination("build/")
.use(sass({
outputDir: function(originalPath) {
outputDir: function(originalPath) {
// this will change scss/some/path to css/some/path
return originalPath.replace("scss", "css");
}
Expand All @@ -94,7 +96,7 @@ Metalsmith()
The easiest way to enable source maps in your metalsmith project is to add the following options:

```js
Metalsmith()
Metalsmith(__dirname)
.source("src/")
.destination("build/")
.use(sass({
Expand Down
Loading

0 comments on commit beecccc

Please sign in to comment.