Skip to content

Commit

Permalink
Merge pull request #49 from noseglid/nodejs-module
Browse files Browse the repository at this point in the history
nodejs module definition
  • Loading branch information
parisk committed Apr 12, 2016
2 parents a88e27c + 6a87253 commit a54eb8a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/xterm.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@
*/

(function (xterm) {
if (typeof define == 'function') {
if (typeof exports === 'object' && typeof module === 'object') {
/*
* npm/nodejs project
*/
module.exports = xterm.call(this);
} else if (typeof define == 'function') {
/*
* Require.js is available
*/
Expand Down

0 comments on commit a54eb8a

Please sign in to comment.