Skip to content

Instantly share code, notes, and snippets.

@mogarick
Last active July 4, 2016 09:54
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mogarick/edfe96cb0a7682996c1d to your computer and use it in GitHub Desktop.
Save mogarick/edfe96cb0a7682996c1d 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