Skip to content

Commit 7789c75

Browse files
committed
Improve commonjs support
Fix #64
1 parent d5f1766 commit 7789c75

14 files changed

+595
-574
lines changed

.babelrc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
{
2-
"presets": ["es2015"]
2+
"presets": [
3+
["es2015", { "loose": true }]
4+
],
5+
"plugins": [
6+
"add-module-exports"
7+
]
38
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"png"
1414
],
1515
"scripts": {
16-
"test": "./node_modules/.bin/ava --verbose --serial",
16+
"test": "./node_modules/.bin/ava test/*.js --verbose --serial",
1717
"build": "./node_modules/.bin/babel src/ --out-dir lib/",
1818
"watch": "./node_modules/.bin/babel --watch src/ --out-dir lib/",
1919
"prepublish": "npm test",
@@ -27,6 +27,7 @@
2727
"devDependencies": {
2828
"ava": "^0.15.2",
2929
"babel-cli": "^6.4.0",
30+
"babel-plugin-add-module-exports": "^0.2.1",
3031
"babel-preset-es2015": "^6.3.13"
3132
},
3233
"dependencies": {

0 commit comments

Comments
 (0)