Skip to content

Commit 10891d8

Browse files
aze3matimarney
authored andcommitted
Update/react app rewire sass (timarney#267)
* update react-app-rewire-sass README * add react-app-rewire-scss to loaders list
1 parent c00650b commit 10891d8

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

README.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
1+
22
[![npm version](https://img.shields.io/npm/v/react-app-rewired.svg)](https://www.npmjs.com/package/react-app-rewired)
33
[![npm monthly downloads](https://img.shields.io/npm/dm/react-app-rewired.svg)](https://www.npmjs.com/package/react-app-rewired)
4-
4+
55
<img alt="react-app-rewired" src="https://github.com/timarney/react-app-rewired/raw/master/assets/react-app-rewired.png" />
66

77
# Rewire Your App
@@ -73,7 +73,7 @@ $ npm run build
7373
```
7474

7575

76-
## Utilities
76+
## Utilities
7777

7878
#### 1) injectBabelPlugin
7979

@@ -88,25 +88,25 @@ const {injectBabelPlugin} = require('react-app-rewired');
8888
module.exports = function override(config, env) {
8989
// add a plugin
9090
config = injectBabelPlugin('emotion/babel',config)
91-
91+
9292
// use the Preact rewire
9393
if (env === "production") {
9494
console.log("⚡ Production build with Preact");
9595
config = rewirePreact(config, env);
9696
}
97-
97+
9898
// use the MobX rewire
9999
config = rewireMobX(config,env);
100-
100+
101101
return config;
102102
}
103103
```
104104

105105
#### 2) compose(after v1.3.4)
106106

107107
You can use this util to compose rewires.
108-
> A functional programming utility, performs `right-to-left` function composition.
109-
More detail you can see [ramda](http://ramdajs.com/docs/#compose) or [redux](http://redux.js.org/docs/api/compose.html#composefunctions)
108+
> A functional programming utility, performs `right-to-left` function composition.
109+
More detail you can see [ramda](http://ramdajs.com/docs/#compose) or [redux](http://redux.js.org/docs/api/compose.html#composefunctions)
110110

111111
Before:
112112
```javascript
@@ -115,7 +115,7 @@ module.exports = function override(config, env) {
115115
config = rewireLess(config, env);
116116
config = rewirePreact(config, env);
117117
config = rewireMobX(config, env);
118-
118+
119119
return config;
120120
}
121121
```
@@ -130,7 +130,7 @@ module.exports = compose(
130130
rewireMobx
131131
...
132132
)
133-
// custom config
133+
// custom config
134134
module.exports = function(config, env){
135135
const rewires = compose(
136136
rewireLess,
@@ -143,11 +143,11 @@ module.exports = function(config, env){
143143
return rewires(config, env);
144144
}
145145
```
146-
Some change with rewire, if you want to add some `extra param` for `rewire`
147-
1. Optional params:
148-
you can see [react-app-rewire-less](https://github.com/timarney/react-app-rewired/blob/master/packages/react-app-rewire-less/index.js)
146+
Some change with rewire, if you want to add some `extra param` for `rewire`
147+
1. Optional params:
148+
you can see [react-app-rewire-less](https://github.com/timarney/react-app-rewired/blob/master/packages/react-app-rewire-less/index.js)
149149

150-
2. Required params:
150+
2. Required params:
151151
```javascript
152152
// rewireSome.js
153153
function createRewire(requiredParams){
@@ -343,6 +343,7 @@ If you need to change the location of your config-overrides.js you can pass a co
343343
* [react-app-rewire-babel-loader](https://github.com/dashed/react-app-rewire-babel-loader) by [@dashed](https://github.com/dashed)
344344
* [react-app-rewire-svgr](https://github.com/gitim/react-app-rewire-svgr) by [@gitim](https://github.com/gitim)
345345
* [react-app-rewire-yaml](https://github.com/hsz/react-app-rewire-yaml) by [@hsz](https://github.com/hsz)
346+
* [react-app-rewire-scss](https://github.com/aze3ma/react-app-rewire-scss) by [@aze3ma](https://github.com/aze3ma)
346347

347348
## Other
348349

0 commit comments

Comments
 (0)