Last active
August 29, 2015 14:03
-
-
Save totty90/106f9577482154f9ab4e to your computer and use it in GitHub Desktop.
Revisions
-
totty90 revised this gist
Jul 11, 2014 . 5 changed files with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes.File renamed without changes.File renamed without changes.File renamed without changes.File renamed without changes. -
totty90 revised this gist
Jul 11, 2014 . 5 changed files with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes.File renamed without changes.File renamed without changes.File renamed without changes.File renamed without changes. -
totty90 revised this gist
Jul 11, 2014 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ (typeof define==="function"?define:function(f){var r=f(require,exports,module);module.exports=(r!==void 0?r:module.exports);})(function(require,exports,module){ module.exports = 27; }) -
totty90 revised this gist
Jul 11, 2014 . 5 changed files with 10 additions and 27 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ console.log(require('moduleA')); // 27 This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ define(['moduleA'], function(moduleA){ console.log(moduleA); // 27 }) This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ define(function(require, exports, module){ console.log(require('moduleA')); // 27 }) This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ (typeof define==="function"?define:function(f){var r=f(require,exports,module);module.exports=(r!==void 0?r:module.exports);})(function(require,exports,module){ return 27; }) This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,27 +0,0 @@ -
totty90 created this gist
Jul 11, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ (typeof define==="function"?define:function(f){module.exports=f(require,exports,module)})(function(require,exports,module){ return {myModule: 5}; // require('someModule').myModule === 5; // or return function(a){return a}; // require('someModule')(3) === 3; // or var A = function(a){this.a = a}; A.prototype.xxx = function(){return this.a}; return A; // var a = new require('someModule')(1) // a.xxx() === 1; // // with requirejs // define(['someModule'], function(someModule){ // var a = new someModule(1); // a.xxx() === 1; // }) })