Skip to content

Commit

Permalink
Merge pull request #1 from bios21/feature/module-undefined
Browse files Browse the repository at this point in the history
Handle module undefined for cross-compat brower/node
  • Loading branch information
lsagetlethias authored Aug 8, 2016
2 parents 2e332e1 + 175bc9f commit 495644f
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 13 deletions.
4 changes: 2 additions & 2 deletions bin/EventEmitter.browser.js

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,8 @@
"bower_components",
"test",
"tests"
]
],
"dependencies": {
"superlazypromise": "^0.0.2"
}
}
4 changes: 2 additions & 2 deletions dist_node/EventEmitter.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const gulp = require('gulp'),
gutil = require('gulp-util'),
concat = require('gulp-concat');

gulp.task('build', () => {
gulp.task('build', ['clean'], () => {
gutil.log('Build for Node ...');
gulp.src('src/**/*.js')
.pipe(babel({
Expand Down Expand Up @@ -33,10 +33,9 @@ gulp.task('clean', () => {
.pipe(clean())
});

gulp.task('watch', ['cleanBuild'], () => {
gulp.task('watch', ['build'], () => {
gulp.watch(['bower.json', 'src/index.html'], ['bower']);
gulp.watch('src/**/*.js', ['build']);
});

gulp.task('default', ['watch']);
gulp.task('cleanBuild', ['clean', 'build']);
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,5 @@
"bugs": {
"url": "https://github.com/bios21/eventemitter-promise/issues"
},
"homepage": "https://github.com/bios21/eventemitter-promise#readme",
"dependencies": {
"superlazypromise": "0.0.1"
}
"homepage": "https://github.com/bios21/eventemitter-promise#readme"
}
2 changes: 1 addition & 1 deletion src/EventEmitter.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

var _module = null,
_exports = null;
if (module && module.exports) {
if (typeof(module) !== 'undefined' && module.exports) {
_exports = module.exports;
_module = {
SuperLazyPromise: require('superlazypromise').SuperLazyPromise
Expand Down

0 comments on commit 495644f

Please sign in to comment.