pkgjs

0.1.0 • Public • Published

pkgjs

pkgjs YourObj -s source.js -o output.js

处理结果

(function() {
 
    // 你的源码 Variable 是你要导出的对象
 
    if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {
        define(function() {
            return Variable;
        });
    } else if (typeof module !== 'undefined' && module.exports) {
        module.exports = Variable;
    } else {
        window.Variable = Variable;
    }
 
})();

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i pkgjs

      Weekly Downloads

      1

      Version

      0.1.0

      License

      none

      Last publish

      Collaborators

      • edwonlim