File tree Expand file tree Collapse file tree 1 file changed +8
-17
lines changed Expand file tree Collapse file tree 1 file changed +8
-17
lines changed Original file line number Diff line number Diff line change 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 ) .
6
3
``` js
7
- let redblacktree = require ( ' github:aureooms/es-red-black-tree ' ) ;
4
+ require ( ' babel-polyfill ' ) ;
8
5
// or
9
- import redblacktree from ' aureooms-es-red-black-tree ' ;
6
+ import ' babel-polyfill ' ;
10
7
```
11
8
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
15
10
``` 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' ;
17
14
```
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.
You can’t perform that action at this time.
0 commit comments