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) {
|
(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
|
* Require.js is available
|
||||||
*/
|
*/
|
||||||
|
|||||||
+6
-1
@@ -12,7 +12,12 @@
|
|||||||
* of columns)
|
* of columns)
|
||||||
*/
|
*/
|
||||||
(function (fit) {
|
(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
|
* Require.js is available
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -11,7 +11,12 @@
|
|||||||
* fullscreen mode is being toggled.
|
* fullscreen mode is being toggled.
|
||||||
*/
|
*/
|
||||||
(function (fullscreen) {
|
(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
|
* Require.js is available
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
(function (linkify) {
|
(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
|
* Require.js is available
|
||||||
*/
|
*/
|
||||||
|
|||||||
+1
-1
@@ -34,7 +34,7 @@
|
|||||||
(function (xterm) {
|
(function (xterm) {
|
||||||
if (typeof exports === 'object' && typeof module === 'object') {
|
if (typeof exports === 'object' && typeof module === 'object') {
|
||||||
/*
|
/*
|
||||||
* npm/nodejs project
|
* CommonJS environment
|
||||||
*/
|
*/
|
||||||
module.exports = xterm.call(this);
|
module.exports = xterm.call(this);
|
||||||
} else if (typeof define == 'function') {
|
} else if (typeof define == 'function') {
|
||||||
|
|||||||
Reference in New Issue
Block a user