Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.

Commit 13d0d1c

Browse files
committed
chore: update readme, dependecies, package.json
1 parent bc90a41 commit 13d0d1c

File tree

3 files changed

+824
-361
lines changed

3 files changed

+824
-361
lines changed

README.md

Lines changed: 42 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
# styled-jsx-plugin-sass
1+
# styled-jsx-plugin-sass-2
22

3-
[![Build Status](https://travis-ci.org/giuseppeg/styled-jsx-plugin-sass.svg?branch=master)](https://travis-ci.org/giuseppeg/styled-jsx-plugin-sass)
4-
[![npm](https://img.shields.io/npm/v/styled-jsx-plugin-sass.svg)](https://www.npmjs.com/package/styled-jsx-plugin-sass)
3+
Use [Sass](http://sass-lang.com/) with [styled-jsx](https://github.com/vercel/styled-jsx) 💥
54

6-
Use [Sass](http://sass-lang.com/) with [styled-jsx](https://github.com/zeit/styled-jsx) 💥
5+
This is a fixed/updated version of [styled-jsx-plugin-sass](https://github.com/giuseppeg/styled-jsx-plugin-sass) by [@giuseppeg](https://github.com/giuseppeg), made because that package seems to be outdated. It works with [indented sass](#indented-syntax) and dart sass too.
76

87
## Usage
98

@@ -19,14 +18,18 @@ Install the `node-sass` version you need (it is a peer dependency).
1918
npm install --save-dev node-sass
2019
```
2120

22-
Next, add `styled-jsx-plugin-sass` to the `styled-jsx`'s `plugins` in your babel configuration:
21+
Next, add `styled-jsx-plugin-sass-2` to the `styled-jsx`'s `plugins` in your babel configuration (e.g. `.babelrc`):
2322

2423
```json
2524
{
26-
"plugins": [
25+
"presets": [
2726
[
28-
"styled-jsx/babel",
29-
{ "plugins": ["styled-jsx-plugin-sass"] }
27+
"next/babel",
28+
{
29+
"styled-jsx": {
30+
"plugins": ["styled-jsx-plugin-sass-2"]
31+
}
32+
}
3033
]
3134
]
3235
}
@@ -38,19 +41,40 @@ Node-sass can be configured using `sassOptions`. This is useful for setting opti
3841

3942
```json
4043
{
41-
"plugins": [
44+
"presets": [
4245
[
43-
"styled-jsx/babel",
46+
"next/babel",
4447
{
45-
"plugins": [
46-
["styled-jsx-plugin-sass", {
47-
"sassOptions": {
48-
"includePaths": ["./styles"],
49-
"precision": 2
48+
"styled-jsx": {
49+
"plugins": [
50+
["styled-jsx-plugin-sass-2", {
51+
"sassOptions": {
52+
"includePaths": ["./styles"],
53+
"precision": 2
54+
}
5055
}
51-
}
56+
]
5257
]
53-
]
58+
}
59+
}
60+
]
61+
]
62+
}
63+
```
64+
65+
### Indented syntax
66+
67+
To use indented sytax, you will need to update your `sassOptions` inside your babel configuration file.
68+
69+
```json
70+
{
71+
"presets": [
72+
[
73+
"next/babel",
74+
{
75+
"styled-jsx": {
76+
"plugins": [["styled-jsx-plugin-sass-2", { "sassOptions": { "indentedSyntax": true } }]]
77+
}
5478
}
5579
]
5680
]
@@ -59,7 +83,7 @@ Node-sass can be configured using `sassOptions`. This is useful for setting opti
5983

6084
#### Notes
6185

62-
`styled-jsx-plugin-sass` uses `styled-jsx`'s plugin system which is supported from version 2.
86+
`styled-jsx-plugin-sass-2` uses `styled-jsx`'s plugin system which is supported from version 2.
6387

6488
Read more on their repository for further info.
6589

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
{
2-
"name": "styled-jsx-plugin-sass",
3-
"version": "1.0.0",
2+
"name": "styled-jsx-plugin-sass-2",
3+
"version": "2.0.0",
44
"description": "Plugin to add Sass support to styled-jsx",
55
"main": "index.js",
66
"scripts": {
77
"test": "mocha test.js"
88
},
99
"repository": {
1010
"type": "git",
11-
"url": "git+https://github.com/giuseppeg/styled-jsx-plugin-sass.git"
11+
"url": "git+https://github.com/martonlederer/styled-jsx-plugin-sass-2.git"
1212
},
1313
"keywords": [
1414
"styled-jsx-plugin",
1515
"styled-jsx",
1616
"sass"
1717
],
18-
"author": "Giuseppe Gurgone",
18+
"author": "Marton Lederer",
1919
"license": "MIT",
2020
"bugs": {
21-
"url": "https://github.com/giuseppeg/styled-jsx-plugin-sass/issues"
21+
"url": "https://github.com/martonlederer/styled-jsx-plugin-sass-2/issues"
2222
},
23-
"homepage": "https://github.com/giuseppeg/styled-jsx-plugin-sass#readme",
23+
"homepage": "https://github.com/martonlederer/styled-jsx-plugin-sass-2#readme",
2424
"peerDependencies": {
2525
"node-sass": "*"
2626
},
2727
"devDependencies": {
28-
"mocha": "^4.0.1",
29-
"node-sass": "^4.5.3",
30-
"strip-indent": "^2.0.0"
28+
"mocha": "^8.2.0",
29+
"node-sass": "^5.0.0",
30+
"strip-indent": "^3.0.0"
3131
}
3232
}

0 commit comments

Comments
 (0)