Skip to content

Commit 4863fd9

Browse files
authored
Add usages with the legacy version
Updated README to include the usages with the legacy version which exposes an object instead of a function.
1 parent 2e65d67 commit 4863fd9

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

README.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Basic usage
3333

3434
#### Usage with commonJS
3535

36-
```bash
36+
```javascript
3737
const postcss = require('postcss');
3838
const postcssRTLCSS = require('postcss-rtlcss');
3939

@@ -45,9 +45,14 @@ const result = postcss([
4545
const rtlCSS = result.css;
4646
```
4747

48+
##### commonJS with the legacy version (1.x.x)
49+
```javascript
50+
const { postcssRTLCSS } = require('postcss-rtlcss');
51+
```
52+
4853
#### Usage with ES6 modules
4954

50-
```bash
55+
```javascript
5156
import postcss from 'postcss';
5257
import postcssRTLCSS from 'postcss-rtlcss';
5358

@@ -59,9 +64,15 @@ const result = postcss([
5964
const rtlCSS = result.css;
6065
```
6166

67+
##### ES6 modules with the legacy version (1.x.x)
68+
69+
```javascript
70+
import { postcssRTLCSS } from 'postcss-rtlcss';
71+
```
72+
6273
#### Usage in Webpack with postcss-loader
6374

64-
```bash
75+
```javascript
6576
rules: [
6677
{
6778
test: /\.css$/,

0 commit comments

Comments
 (0)