Skip to content

Commit 71c47cc

Browse files
committed
4.0.0
1 parent 4e321fc commit 71c47cc

12 files changed

+82
-87
lines changed

.tape.js

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -6,47 +6,47 @@ const processOptions = {
66
};
77

88
module.exports = {
9-
'postcss-sass': {
10-
'basic': {
11-
message: 'supports basic usage',
12-
processOptions: processOptions,
13-
source: 'basic.scss'
9+
'basic': {
10+
message: 'supports basic usage',
11+
processOptions,
12+
source: 'basic.scss'
13+
},
14+
'basic:sassopts': {
15+
message: 'supports sass options usage',
16+
options: {
17+
indentType: 'tab',
18+
indentWidth: 1,
19+
outputStyle: 'expanded'
1420
},
15-
'basic:sassopts': {
16-
message: 'supports sass options usage',
17-
options: {
18-
indentType: 'tab',
19-
indentWidth: 1,
20-
outputStyle: 'expanded'
21-
},
22-
processOptions: processOptions,
23-
source: 'basic.scss'
24-
},
25-
'basic:mixed': {
26-
message: 'supports mixed (postcss-unroot, postcss-sass) usage',
27-
plugin: () => require('postcss')(
28-
require('postcss-unroot'),
29-
require('.')
30-
),
31-
processOptions: processOptions,
32-
source: 'basic.scss'
33-
},
34-
'imports': {
35-
message: 'supports imports usage',
36-
plugin: () => require('postcss')(
37-
require('.')
38-
),
39-
processOptions: processOptions,
40-
source: 'imports.scss'
41-
},
42-
'css-imports': {
43-
message: 'supports imports (postcss-import, postcss-sass) usage',
44-
plugin: () => require('postcss')(
45-
require('postcss-import'),
46-
require('.')
47-
),
48-
processOptions: processOptions,
49-
source: 'css-imports.scss'
50-
}
21+
processOptions,
22+
source: 'basic.scss'
23+
},
24+
'basic:mixed': {
25+
message: 'supports mixed (postcss-unroot, postcss-sass) usage',
26+
plugin: require('postcss')([
27+
require('postcss-unroot'),
28+
require('.')
29+
]),
30+
processOptions,
31+
source: 'basic.scss'
32+
},
33+
'imports': {
34+
message: 'supports imports usage',
35+
plugin: require('postcss')(
36+
require('.')
37+
),
38+
processOptions,
39+
source: 'imports.scss'
40+
},
41+
'postcss-imports': {
42+
message: 'supports imports (postcss-import, postcss-sass) usage',
43+
plugin: require('postcss')(
44+
require('postcss-import'),
45+
require('.')
46+
),
47+
processOptions: Object.assign({}, processOptions, {
48+
syntax: require('postcss-scss')
49+
}),
50+
source: 'postcss-imports.scss'
5151
}
5252
};

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changes to PostCSS Sass
22

3+
### 4.0.0 (January 23, 2018)
4+
5+
- Replaced: `node-sass` with `dart-sass`
6+
- Updated: `postcss` to 7.0.14 (patch)
7+
38
### 3.0.0 (October 4, 2018)
49

510
- Fixed: issue with sourcemaps 0.7.x returning a Promise instead of an Object

README.md

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![NPM Version][npm-img]][npm-url]
44
[![Linux Build Status][cli-img]][cli-url]
55
[![Windows Build Status][win-img]][win-url]
6-
[![Gitter Chat][git-img]][git-url]
6+
[![Support Chat][git-img]][git-url]
77

88
[PostCSS Sass] lets you use [Sass] as a [PostCSS] plugin.
99

@@ -20,14 +20,12 @@ $primary-color: #333;
2020

2121
:root {
2222
color: #333;
23-
font: 100% Helvetica, sans-serif; }
23+
font: 100% Helvetica, sans-serif;
24+
}
2425
```
2526

26-
[PostCSS Sass] uses [node-sass][Sass] to provide binding for Node.js to
27-
[LibSass], the C version of Sass.
28-
29-
By using [PostCSS Sass], you can safely run transforms before and after Sass,
30-
watch for changes to Sass imports, and preserve source maps.
27+
[PostCSS Sass] uses [dart-sass], letting you safely run transforms before and
28+
after Sass, watching for changes to Sass imports, and preserving source maps.
3129

3230
## Usage
3331

@@ -133,25 +131,22 @@ grunt.initConfig({
133131

134132
## Options
135133

136-
[PostCSS Sass] options are a limited subset of [Node-sass options], which do
137-
not include `file`, `outFile`, `data`, `importer`, `omitSourceMapUrl`,
138-
`sourceMap`, and `sourceMapContents`, as these must be handled by [PostCSS] and
139-
[PostCSS Sass].
134+
[PostCSS Sass] options are directly forwarded to [dart-sass options].
140135

141-
[npm-url]: https://www.npmjs.com/package/@csstools/postcss-sass
142-
[npm-img]: https://img.shields.io/npm/v/@csstools/postcss-sass.svg
143-
[cli-url]: https://travis-ci.org/jonathantneal/postcss-sass
144136
[cli-img]: https://img.shields.io/travis/jonathantneal/postcss-sass.svg
145-
[win-url]: https://ci.appveyor.com/project/jonathantneal/postcss-sass
146-
[win-img]: https://img.shields.io/appveyor/ci/jonathantneal/postcss-sass.svg
137+
[cli-url]: https://travis-ci.org/jonathantneal/postcss-sass
138+
[git-img]: https://img.shields.io/badge/support-chat-blue.svg
147139
[git-url]: https://gitter.im/postcss/postcss
148-
[git-img]: https://img.shields.io/badge/chat-gitter-blue.svg
140+
[npm-img]: https://img.shields.io/npm/v/@csstools/postcss-sass.svg
141+
[npm-url]: https://www.npmjs.com/package/@csstools/postcss-sass
142+
[win-img]: https://img.shields.io/appveyor/ci/jonathantneal/postcss-sass.svg
143+
[win-url]: https://ci.appveyor.com/project/jonathantneal/postcss-sass
149144

150145
[Gulp PostCSS]: https://github.com/postcss/gulp-postcss
151146
[Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss
152-
[LibSass]: https://github.com/sass/libsass
153-
[Node-sass options]: https://github.com/sass/node-sass#options
147+
[dart-sass]: https://github.com/sass/dart-sass
148+
[dart-sass options]: https://github.com/sass/dart-sass#javascript-api
154149
[PostCSS]: https://github.com/postcss/postcss
155150
[PostCSS Sass]: https://github.com/jonathantneal/postcss-sass
156-
[Sass]: https://github.com/sass/node-sass
151+
[Sass]: https://github.com/sass/dart-sass
157152
[SCSS Parser]: https://github.com/postcss/postcss-scss

package.json

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@csstools/postcss-sass",
3-
"version": "3.0.0",
3+
"version": "4.0.0",
44
"description": "Use Sass as a PostCSS plugin",
55
"author": "Jonathan Neal <[email protected]>",
66
"license": "CC0-1.0",
@@ -21,27 +21,28 @@
2121
"test:tape": "postcss-tape"
2222
},
2323
"engines": {
24-
"node": ">=4.0.0"
24+
"node": ">=8.0.0"
2525
},
2626
"dependencies": {
2727
"@csstools/sass-import-resolve": "^1.0.0",
28-
"postcss": "^7.0.5",
28+
"postcss": "^7.0.14",
2929
"sass": "^1.16.1",
3030
"source-map": "~0.7.3"
3131
},
3232
"devDependencies": {
33-
"@babel/core": "^7.0.0",
34-
"@babel/preset-env": "^7.0.0",
33+
"@babel/core": "^7.2.2",
34+
"@babel/preset-env": "^7.3.1",
3535
"babel-eslint": "^10.0.1",
3636
"echint": "^4.0.1",
37-
"eslint": "^5.6.1",
37+
"eslint": "^5.12.1",
3838
"eslint-config-dev": "2.0.0",
39-
"postcss-import": "^12.0.0",
40-
"postcss-tape": "2.2.0",
39+
"postcss-import": "^12.0.1",
40+
"postcss-scss": "^2.0.0",
41+
"postcss-tape": "4.0.0",
4142
"postcss-unroot": "^1.0.2",
4243
"pre-commit": "^1.2.2",
43-
"rollup": "^0.66.4",
44-
"rollup-plugin-babel": "^4.0.1"
44+
"rollup": "^1.1.2",
45+
"rollup-plugin-babel": "^4.3.2"
4546
},
4647
"eslintConfig": {
4748
"extends": "dev",

test/basic.mixed.expect.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/css-components/page.css

Lines changed: 0 additions & 4 deletions
This file was deleted.

test/css-components/vars.css

Lines changed: 0 additions & 2 deletions
This file was deleted.

test/css-imports.expect.css

Lines changed: 0 additions & 5 deletions
This file was deleted.

test/css-imports.scss

Lines changed: 0 additions & 2 deletions
This file was deleted.

test/postcss-imports.expect.css

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)