Skip to content

Instantly share code, notes, and snippets.

@ncl0w
Forked from mogarick/index.js
Created April 21, 2016 16:43
Show Gist options
  • Save ncl0w/b1df7958d955ecc0c9a1319a05fd9ede to your computer and use it in GitHub Desktop.
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 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