Skip to content

Commit

Permalink
#1 Module is not exported as commonjs module
Browse files Browse the repository at this point in the history
  • Loading branch information
ziflex committed Nov 7, 2016
1 parent a7f09e9 commit fc9fa80
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 4 deletions.
8 changes: 8 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,11 @@ classes/
dump.rdb
src
test

.babelrc
.editorconfig
.eslintignore
.eslintrc.json
.istanbul.yml
.travis.yml
.gitignore
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 0.1.2

### Fixed

* Module was not exported as commonjs module.


## 0.1.1

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gulp-tasks-monorepo",
"version": "0.1.1",
"version": "0.1.2",
"description": "Tool for running gulp tasks against multiple packages",
"main": "lib/index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ class Manager {
}
}

export default function create(...args) {
module.exports = function create(...args) {
return new Manager(...args);
}
};
8 changes: 7 additions & 1 deletion test/unit/index.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-unused-expressions, import/no-extraneous-dependencies */
/* eslint-disable global-require, no-unused-expressions, import/no-extraneous-dependencies */
import { expect } from 'chai';
import sinon from 'sinon';
import path from 'path';
Expand Down Expand Up @@ -58,4 +58,10 @@ describe('Index', () => {
done(err);
});
});

it('should be exported as "commonjs" module', () => {
const Monorepo = require('../../src/index');

expect(typeof Monorepo === 'function').to.be.true;
});
});

0 comments on commit fc9fa80

Please sign in to comment.