Created
December 22, 2016 10:55
-
-
Save gracefullight/6e84e686cf119dadb99fefdeb258c6d0 to your computer and use it in GitHub Desktop.
This file contains 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 characters
(function (global, factory) { | |
if (typeof define === 'function' && define.amd) { | |
// AMD 환경 | |
define(['exports', 'jquery'], factory); | |
} else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') { | |
// CommonJS 환경 | |
factory(exports, require('jquery')); | |
} else { | |
// 일반 브라우저 | |
factory((global.module1 = global.module1 || {}), global.$); | |
} | |
}(this, function (exports, $) { | |
// module1의 private 기능 구현 | |
// exports에 public function을 붙혀주면 된다. | |
exports.action = function () {}; | |
})); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment