-
-
Save ncl0w/b1df7958d955ecc0c9a1319a05fd9ede to your computer and use it in GitHub Desktop.
Wrapper / Facade to expose pickadate components for using out of the box in Browserify by using a simple require('pickadate') (No need to assign to a variable)
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 characters
//This code is a simple adaptation from the index.js file in CryptoJS node module | |
(function (root, factory, undef) { | |
if (typeof exports === "object") { | |
// CommonJS | |
module.exports = exports = factory(require('./picker'), require('./picker.date'), require('./picker.time')); | |
} | |
else if (typeof define === "function" && define.amd) { | |
// AMD | |
define(['./picker','./picker.date', './picker.time'], factory); | |
} | |
else { | |
// Global (browser) | |
factory(root.Picker); | |
} | |
}(this, function (Picker) { | |
return Picker; | |
})); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment