Mangopay / cardregistration-js-kit

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

New release on npm ? #23

Closed Sinewyk closed 8 years ago

Sinewyk commented 8 years ago

Hey, could you do a new release on npm of the lastest version ?

Normally I wouldn't really ask this because the git syntax is supported by npm, but seems that it's not good if the repo has a submodule, npm then tries to do weird things like this ...

npm ERR! git submodule -q update --init --recursive: No submodule mapping found in .gitmodules for path 'demo/mangopay2-php-sdk'

Don't hesitate to take advantage of the prepublish step to push everything boring inside for a oneliner publish.

hobailey commented 8 years ago

Hey @Sinewyk, sorry for the delay getting back to you. I'm not an npm expert, but from reading around, I get the impression that one should really use git to manage the submodules (eg) and there exist various plugins to do the job for npm if necessary. And also, this depenancy is only if you want to use the example provided, but there is no obligation at all to use the PHP SDK with this kit (and therefore I find it a shame to classify it as a "depenancy" which might give people the wrong impression). What do you think?

Sinewyk commented 8 years ago

Yeah you are absolutely right. I was just saying that IF you do a npm release, there's no .git packaged into it, so there's no possibility for submodules shenanigans. Only someone cloning this repo (to work on it) can do some submodule stuff.

npm i on Windows 10 + npm 3 with

"mangopay-cardregistration-js-kit": "git://github.com/mangopay/cardregistration-js-kit.git#918275588d44bd5de0cbc0a5ac1fb04682accddc",

in the package.json triggers this weird submodule error.

I wanted you to release a new version to just bypass that submodule bug entirely.

Sinewyk commented 8 years ago

Oh, yeah, the error is pretty easy: I don't know how github is doing it but, the .gitmodules file is missing with its content that should be

[submodule "demo/mangopay2-php-sdk"]
       path = demo/mangopay2-php-sdk
       url = git@github.com:MangoPay/mangopay2-php-sdk.git
hobailey commented 8 years ago

Yep, I came to that conclusion this morning but didn't get any further :-/ I'll do a new npm release shortly and you can let me know if that's any better for you :-)

hobailey commented 8 years ago

@Sinewyk just released the patch - let me know how your install goes this time :-)

Sinewyk commented 8 years ago

Did the trick, thanks =)

hobailey commented 8 years ago

Great, thanks for the update!