mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Make all add-ons CommonJS importable
- Fix #52 - Rename `npm/nodejs project` documentation to `CommonJS environment`
This commit is contained in:
@@ -7,7 +7,12 @@
|
||||
*/
|
||||
|
||||
(function (attach) {
|
||||
if (typeof define == 'function') {
|
||||
if (typeof exports === 'object' && typeof module === 'object') {
|
||||
/*
|
||||
* CommonJS environment
|
||||
*/
|
||||
module.exports = attach.call(this);
|
||||
} else if (typeof define == 'function') {
|
||||
/*
|
||||
* Require.js is available
|
||||
*/
|
||||
|
||||
+6
-1
@@ -12,7 +12,12 @@
|
||||
* of columns)
|
||||
*/
|
||||
(function (fit) {
|
||||
if (typeof define == 'function') {
|
||||
if (typeof exports === 'object' && typeof module === 'object') {
|
||||
/*
|
||||
* CommonJS environment
|
||||
*/
|
||||
module.exports = fit.call(this);
|
||||
} else if (typeof define == 'function') {
|
||||
/*
|
||||
* Require.js is available
|
||||
*/
|
||||
|
||||
@@ -11,7 +11,12 @@
|
||||
* fullscreen mode is being toggled.
|
||||
*/
|
||||
(function (fullscreen) {
|
||||
if (typeof define == 'function') {
|
||||
if (typeof exports === 'object' && typeof module === 'object') {
|
||||
/*
|
||||
* CommonJS environment
|
||||
*/
|
||||
module.exports = fullscreen.call(this);
|
||||
} else if (typeof define == 'function') {
|
||||
/*
|
||||
* Require.js is available
|
||||
*/
|
||||
@@ -19,7 +24,7 @@
|
||||
} else {
|
||||
/*
|
||||
* Plain browser environment
|
||||
*/
|
||||
*/
|
||||
fullscreen(this.Xterm);
|
||||
}
|
||||
})(function (Xterm) {
|
||||
@@ -36,4 +41,4 @@
|
||||
|
||||
this.element.classList[fn]('fullscreen');
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
(function (linkify) {
|
||||
if (typeof define == 'function') {
|
||||
if (typeof exports === 'object' && typeof module === 'object') {
|
||||
/*
|
||||
* CommonJS environment
|
||||
*/
|
||||
module.exports = linkify.call(this);
|
||||
} else if (typeof define == 'function') {
|
||||
/*
|
||||
* Require.js is available
|
||||
*/
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@
|
||||
(function (xterm) {
|
||||
if (typeof exports === 'object' && typeof module === 'object') {
|
||||
/*
|
||||
* npm/nodejs project
|
||||
* CommonJS environment
|
||||
*/
|
||||
module.exports = xterm.call(this);
|
||||
} else if (typeof define == 'function') {
|
||||
|
||||
Reference in New Issue
Block a user