Skip to content
This repository has been archived by the owner on Mar 22, 2022. It is now read-only.

Commit

Permalink
Merge pull request #68 from feathersjs/babel-export
Browse files Browse the repository at this point in the history
Add module exports Babel module and test CommonJS compatibility
  • Loading branch information
daffl committed Feb 17, 2016
2 parents 9bf9545 + 35cbc6d commit 5bf0566
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
Binary file removed .DS_Store
Binary file not shown.
3 changes: 2 additions & 1 deletion .babelrc
@@ -1,3 +1,4 @@
{
"presets": [ "es2015" ]
"plugins": [ "add-module-exports" ],
"presets": [ "es2015" ]
}
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -56,6 +56,7 @@
"async": "^1.4.2",
"babel-cli": "^6.1.18",
"babel-core": "^6.1.21",
"babel-plugin-add-module-exports": "^0.1.2",
"babel-preset-es2015": "^6.1.18",
"body-parser": "^1.9.0",
"feathers": "2.0.0-pre.4",
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Expand Up @@ -14,7 +14,7 @@ const PROVIDERS = {
local
};

export default function(providers) {
export default function auth(providers) {
return function() {
const app = this;
let _super = app.setup;
Expand Down Expand Up @@ -101,4 +101,4 @@ export default function(providers) {
};
}

export { hooks };
auth.hooks = hooks;
7 changes: 7 additions & 0 deletions test/src/index.test.js
@@ -0,0 +1,7 @@
const assert = require('assert');

describe('<%= name %>', () => {
it('is CommonJS compatible', () => {
assert.equal(typeof require('../../lib'), 'function');
});
});

0 comments on commit 5bf0566

Please sign in to comment.