Skip to content

Commit ffb97cd

Browse files
committed
Use kneden and add a minimal test
1 parent 4bae7c8 commit ffb97cd

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed

.babelrc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
{
22
"presets": [
3-
["es2015", {"loose":true}],
4-
"stage-0"
3+
["es2015", {
4+
"loose": true,
5+
"modules": "umd"
6+
}]
57
],
68
"plugins": [
7-
["transform-react-jsx", {"pragma":"h"}]
9+
["transform-react-jsx", {"pragma":"h"}],
10+
"async-to-promises"
811
]
912
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"main": "lib/index.js",
66
"jsnext:main": "src/index.js",
77
"scripts": {
8-
"build": "babel src -d lib -s",
8+
"build": "babel src -d lib --minified --no-comments -s",
99
"prepublish": "npm run -s build && npm run -s test",
1010
"test": "babel-node test",
1111
"release": "npm run -s build && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"
@@ -27,6 +27,7 @@
2727
"homepage": "https://github.com/developit/asyncro",
2828
"devDependencies": {
2929
"babel-cli": "^6.14.0",
30+
"babel-plugin-async-to-promises": "^1.0.5",
3031
"babel-plugin-transform-react-jsx": "^6.8.0",
3132
"babel-preset-es2015": "^6.14.0",
3233
"babel-preset-stage-0": "^6.5.0"

test/index.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,12 @@ assert.equal(typeof series, 'function');
55

66
assert.equal(typeof parallel, 'function');
77

8-
console.log('✅ success');
9-
process.exit(0);
8+
parallel([
9+
() => Promise.resolve('a'),
10+
() => Promise.resolve('b')
11+
]).then( out => {
12+
assert.deepEqual(out, ['a', 'b']);
13+
14+
console.log('✅ success');
15+
process.exit(0);
16+
});

0 commit comments

Comments
 (0)