Skip to content

Commit 4da88b0

Browse files
update manual usage
1 parent 4807c7d commit 4da88b0

File tree

1 file changed

+8
-17
lines changed

1 file changed

+8
-17
lines changed

doc/manual/usage.md

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,14 @@
1-
Depending on the syntax used by this code you will need to pass the source
2-
through a transpiler, for example [babel](https://babeljs.io).
3-
4-
### jspm
5-
Configure [jspm](http://jspm.io) to transpile all the code. Then
1+
The code needs a ES2015+ polyfill to work, for example
2+
[babel-polyfill](https://babeljs.io/docs/usage/polyfill).
63
```js
7-
let redblacktree = require( 'github:aureooms/es-red-black-tree' ) ;
4+
require( 'babel-polyfill' ) ;
85
// or
9-
import redblacktree from 'aureooms-es-red-black-tree' ;
6+
import 'babel-polyfill' ;
107
```
118

12-
### npm
13-
Configure your code to transpile dependencies on the fly (for example with
14-
[babel-register](https://babeljs.io/docs/usage/require)). Then you can
9+
Then
1510
```js
16-
import redblacktree from 'aureooms-es-red-black-tree' ;
11+
const redblacktree = require( 'aureooms-js-red-black-tree' ) ;
12+
// or
13+
import redblacktree from 'aureooms-js-red-black-tree' ;
1714
```
18-
19-
Additionally, for the browser, you can configure
20-
[rollup](http://rollupjs.org),
21-
[browserify](http://browserify.org),
22-
or [webpack](https://webpack.github.io) to transpile and package the
23-
dependencies with your code.

0 commit comments

Comments
 (0)