Skip to content

Commit 2b8b0b0

Browse files
committed
chore(npm package): fix up the npm package.json and fix documentation on how to install
1 parent 6de5c62 commit 2b8b0b0

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ npm install --save @bigab/async-transform
1919
With [StealJS](http://stealjs.com/), you can import this module with ES6 imports:
2020

2121
```js
22-
import plugin from '@bigab/async-transform';
22+
import asyncTransform from '@bigab/async-transform';
2323
```
2424

2525
### CommonJS
2626

2727
```js
28-
var plugin = require("@bigab/async-transform");
28+
var asyncTransform = require("@bigab/async-transform").default;
2929
```
3030

3131
### Standalone
@@ -35,7 +35,7 @@ Load the `global` version of the plugin:
3535
```html
3636
<script src='./node_modules/async-transform/dist/global/@bigab/async-transform.js'></script>
3737
<script>
38-
asyncTransform([transformFunctions], val);
38+
asyncTransform([transformFunctions], val); // added to window
3939
</script>
4040
```
4141

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@
88
"type": "git",
99
"url": "git://github.com/BigAB/async-transform.git"
1010
},
11+
"main": "dist/cjs/async-transform",
12+
"module": "src/async-transform",
13+
"browser": "dist/global/async-transform.js",
1114
"files": [
12-
"dist/"
15+
"dist/",
16+
"src/async-transform.js"
1317
],
1418
"author": {
1519
"name": "Adam L Barrett",
@@ -30,8 +34,6 @@
3034
"document": "documentjs",
3135
"develop": "done-serve --static --develop --port 8080"
3236
},
33-
"main": "dist/cjs/async-transform",
34-
"browser": "dist/global/async-transform",
3537
"keywords": [
3638
"async",
3739
"small modules"

0 commit comments

Comments
 (0)