Skip to content

Commit c471ca0

Browse files
committed
fix(animation): Fix issue with exporting default class
1 parent 102509e commit c471ca0

5 files changed

Lines changed: 13 additions & 7 deletions

File tree

.babelrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"presets": ["es2015-node4"]
2+
"presets": ["es2015-node4"],
3+
"plugins": ["add-module-exports"]
34
}

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ node_js:
99
- stable
1010
- 5
1111
- 4
12+
before_install:
13+
- npm install -g npm@latest
1214
before_script:
1315
- npm prune
1416
after_success:

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2015 Eugene Obrezkov
3+
Copyright (c) 2015-2016 Eugene Obrezkov
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,12 @@ export default class Print extends Animation {
3333
// shape is an instance of the Shape that need to animate
3434
// cursor is a Cursor instance that you can use for your own purposes
3535
// animate() method must return Promise that fullfils when animation is done
36-
return Promise.all([
37-
this.animateProperty({shape: shape, property: 'x', startValue: 1, endValue: shape.getX()});
38-
this.animateProperty({shape: shape, property: 'y', startValue: 1, endValue: shape.getY()});
39-
]);
36+
return new Promise(resolve => {
37+
Promise.all([
38+
this.animateProperty({shape: shape, property: 'x', startValue: 1, endValue: shape.getX()});
39+
this.animateProperty({shape: shape, property: 'y', startValue: 1, endValue: shape.getY()});
40+
]).then(() => resolve(shape));
41+
});
4042
}
4143
}
4244
```
@@ -45,7 +47,7 @@ export default class Print extends Animation {
4547

4648
The MIT License (MIT)
4749

48-
Copyright (c) 2015 Eugene Obrezkov
50+
Copyright (c) 2015-2016 Eugene Obrezkov
4951

5052
Permission is hereby granted, free of charge, to any person obtaining a copy
5153
of this software and associated documentation files (the "Software"), to deal

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"dependencies": {},
2525
"devDependencies": {
2626
"babel-cli": "6.4.5",
27+
"babel-plugin-add-module-exports": "0.1.2",
2728
"babel-preset-es2015-node4": "2.0.3",
2829
"chai": "3.5.0",
2930
"coveralls": "2.11.6",

0 commit comments

Comments
 (0)