Mangopay / cardregistration-js-kit

Mangopay V2 JS resources for card registration front-end workflow
MIT License
38 stars 34 forks source link

Not compatible with modules (AMD, CommonJS, ...) #19

Closed Guymestef closed 8 years ago

Guymestef commented 8 years ago

Hi,

We cannot load your lib as a module. Can you modify the lib this way?:

(function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : global.mangoPay = factory() }(this, function () { 'use strict';

var mangoPay = { ... };

// for older browsers define trim function (IE 8) if(! String.prototype.trim){
String.prototype.trim = function(){
return this.replace(/^\s+|\s+$/g,'');
}; }

return mangoPay; }));

Sorry for not making a pull request, but I can't clone your repository, still a problem with mangopay2-php-sdk. Even if now we can get it with npm ;)

hobailey commented 8 years ago

Done :-) Thanks for the feedback!

Guymestef commented 8 years ago

Hi,

Can you publish a new version on npm with the last commits embedded?

hobailey commented 8 years ago

Done :-)