File tree Expand file tree Collapse file tree 3 files changed +17
-6
lines changed Expand file tree Collapse file tree 3 files changed +17
-6
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"presets" : [
3
- [" es2015" , {"loose" :true }],
4
- " stage-0"
3
+ [" es2015" , {
4
+ "loose" : true ,
5
+ "modules" : " umd"
6
+ }]
5
7
],
6
8
"plugins" : [
7
- [" transform-react-jsx" , {"pragma" :" h" }]
9
+ [" transform-react-jsx" , {"pragma" :" h" }],
10
+ " async-to-promises"
8
11
]
9
12
}
Original file line number Diff line number Diff line change 5
5
"main" : " lib/index.js" ,
6
6
"jsnext:main" : " src/index.js" ,
7
7
"scripts" : {
8
- "build" : " babel src -d lib -s" ,
8
+ "build" : " babel src -d lib --minified --no-comments - s" ,
9
9
"prepublish" : " npm run -s build && npm run -s test" ,
10
10
"test" : " babel-node test" ,
11
11
"release" : " npm run -s build && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"
27
27
"homepage" : " https://github.com/developit/asyncro" ,
28
28
"devDependencies" : {
29
29
"babel-cli" : " ^6.14.0" ,
30
+ "babel-plugin-async-to-promises" : " ^1.0.5" ,
30
31
"babel-plugin-transform-react-jsx" : " ^6.8.0" ,
31
32
"babel-preset-es2015" : " ^6.14.0" ,
32
33
"babel-preset-stage-0" : " ^6.5.0"
Original file line number Diff line number Diff line change @@ -5,5 +5,12 @@ assert.equal(typeof series, 'function');
5
5
6
6
assert . equal ( typeof parallel , 'function' ) ;
7
7
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
+ } ) ;
You can’t perform that action at this time.
0 commit comments