Skip to content

Commit

Permalink
fix: Error in commonjs. close meikidd#6
Browse files Browse the repository at this point in the history
  • Loading branch information
meikidd committed Nov 23, 2016
1 parent 4765cd4 commit 39e7d71
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"plugins": [
"add-module-exports",
"transform-runtime"
],
"presets": [
Expand Down
3 changes: 2 additions & 1 deletion build/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -742,4 +742,5 @@ var LANGUAGES_LIST = {
}
};

exports.default = LANGUAGES_LIST;
exports.default = LANGUAGES_LIST;
module.exports = exports['default'];
3 changes: 2 additions & 1 deletion build/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,5 @@ ISO6391.validate = function (code) {
return _data2.default[code] !== undefined;
};

exports.default = ISO6391;
exports.default = ISO6391;
module.exports = exports['default'];
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"babel-cli": "^6.18.0",
"babel-core": "^6.18.2",
"babel-plugin-transform-runtime": "^6.15.0",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-polyfill": "^6.16.0",
"babel-preset-es2015": "^6.18.0",
"babel-preset-stage-0": "^6.16.0",
Expand Down
4 changes: 2 additions & 2 deletions test/test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import assert from 'assert';
import ISO6391 from '../src/index';
import LANGUAGES_LIST from '../src/data';
import ISO6391 from '../build/index';
import LANGUAGES_LIST from '../build/data';

describe('getName()', () => {
it('en', () => assert.equal(ISO6391.getName('en'), 'English'))
Expand Down

0 comments on commit 39e7d71

Please sign in to comment.