Skip to content

Commit

Permalink
Add support for CommonJS style workflows.
Browse files Browse the repository at this point in the history
This allows ES6/commonjs workflows to use operative without adding it to the global scope. This also satisfies issue padolsey#39 padolsey#39
  • Loading branch information
lsimkins committed Nov 9, 2015
1 parent 9d925c9 commit 0e0edb8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/operative.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,5 +127,9 @@
};

// Expose:
window.operative = operative;
if (typeof module !== 'undefined' && typeof module.exports !== 'undefined')
module.exports = operative;
} else {
window.operative = operative;
}
})();

0 comments on commit 0e0edb8

Please sign in to comment.