fix for node.js evn
This commit is contained in:
parent
85e477e288
commit
91a5bb160c
|
@ -1,22 +1,36 @@
|
|||
/* Nuclear v0.2.10
|
||||
/* Nuclear v0.2.11
|
||||
* By AlloyTeam http://www.alloyteam.com/
|
||||
* Github: https://github.com/AlloyTeam/Nuclear
|
||||
* MIT Licensed.
|
||||
*/
|
||||
;(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define([], factory);
|
||||
} else if (typeof exports === 'object') {
|
||||
module.exports = factory();
|
||||
} else if (typeof define === "function" && define.cmd) {
|
||||
define(function(require, exports, module){
|
||||
module.exports=factory();
|
||||
});
|
||||
(function( global, factory ) {
|
||||
|
||||
if ( typeof module === "object" && typeof module.exports === "object" ) {
|
||||
// For CommonJS and CommonJS-like environments where a proper `window`
|
||||
// is present, execute the factory and get jQuery.
|
||||
// For environments that do not have a `window` with a `document`
|
||||
// (such as Node.js), expose a factory as module.exports.
|
||||
// This accentuates the need for the creation of a real `window`.
|
||||
// e.g. var Nuclear = require("alloynuclear")(window);
|
||||
// e.g. var Nuclear = require("alloynuclear")(jsdom.jsdom().defaultView);
|
||||
module.exports = global.document ?
|
||||
factory( global, true ) :
|
||||
function( w ) {
|
||||
if ( !w.document ) {
|
||||
throw new Error( "Nuclear requires a window with a document" );
|
||||
}
|
||||
return factory( w );
|
||||
};
|
||||
} else {
|
||||
factory( global );
|
||||
}
|
||||
root.Nuclear&&root.Nuclear.instances||(root.Nuclear=factory());
|
||||
}(window, function () {
|
||||
|
||||
// Pass this if window is not defined yet
|
||||
}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
|
||||
|
||||
var Nuclear={};
|
||||
var document=window.document;
|
||||
|
||||
|
||||
(function() {
|
||||
"use strict";
|
||||
|
@ -2620,6 +2634,9 @@ Nuclear.Class.extend = function (prop) {
|
|||
}());
|
||||
|
||||
|
||||
if ( !noGlobal ) {
|
||||
window.Nuclear&&window.Nuclear.instances||(window.Nuclear=Nuclear);
|
||||
}
|
||||
|
||||
return Nuclear;
|
||||
}));
|
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "alloynuclear",
|
||||
"version": "0.2.10",
|
||||
"version": "0.2.11",
|
||||
"description": "made UI super easy.",
|
||||
"main": "dist/nuclear.js",
|
||||
"scripts": {
|
||||
|
|
36
src/intro.js
36
src/intro.js
|
@ -1,14 +1,28 @@
|
|||
;(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define([], factory);
|
||||
} else if (typeof exports === 'object') {
|
||||
module.exports = factory();
|
||||
} else if (typeof define === "function" && define.cmd) {
|
||||
define(function(require, exports, module){
|
||||
module.exports=factory();
|
||||
});
|
||||
(function( global, factory ) {
|
||||
|
||||
if ( typeof module === "object" && typeof module.exports === "object" ) {
|
||||
// For CommonJS and CommonJS-like environments where a proper `window`
|
||||
// is present, execute the factory and get jQuery.
|
||||
// For environments that do not have a `window` with a `document`
|
||||
// (such as Node.js), expose a factory as module.exports.
|
||||
// This accentuates the need for the creation of a real `window`.
|
||||
// e.g. var Nuclear = require("alloynuclear")(window);
|
||||
// e.g. var Nuclear = require("alloynuclear")(jsdom.jsdom().defaultView);
|
||||
module.exports = global.document ?
|
||||
factory( global, true ) :
|
||||
function( w ) {
|
||||
if ( !w.document ) {
|
||||
throw new Error( "Nuclear requires a window with a document" );
|
||||
}
|
||||
return factory( w );
|
||||
};
|
||||
} else {
|
||||
factory( global );
|
||||
}
|
||||
root.Nuclear&&root.Nuclear.instances||(root.Nuclear=factory());
|
||||
}(window, function () {
|
||||
|
||||
// Pass this if window is not defined yet
|
||||
}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
|
||||
|
||||
var Nuclear={};
|
||||
var document=window.document;
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
|
||||
if ( !noGlobal ) {
|
||||
window.Nuclear&&window.Nuclear.instances||(window.Nuclear=Nuclear);
|
||||
}
|
||||
|
||||
return Nuclear;
|
||||
}));
|
Loading…
Reference in New Issue