social-share-kit icon indicating copy to clipboard operation
social-share-kit copied to clipboard

Officially maintained on npm?

Open kennynaoh opened this issue 9 years ago • 10 comments

Hello @darklow , I am the member of cdnjs project. We want to host this library. There is a question want to ask. Is this library officially maintained on npm? Because I saw the latest release version on github is v1.0.9, and the latest release version on npm is v1.0.8 Please help confirm that. Thanks for your help!

https://github.com/cdnjs/cdnjs/issues/8505

kennynaoh avatar Jul 13 '16 14:07 kennynaoh

Originally @alexandernst added NPM support, but he transferred npm package ownership back to me. I would love to update npm if I could, receiving error on publish, I have no idea why and haven't found a solution yet:

$ npm publish ./
npm ERR! Darwin 15.5.0
npm ERR! argv "/usr/local/Cellar/node/6.3.0/bin/node" "/usr/local/bin/npm" "publish" "./"
npm ERR! node v6.3.0
npm ERR! npm  v3.10.5

npm ERR! Path must be a string. Received [ 'dist/js/social-share-kit.min.js',
npm ERR!   'dist/css/social-share-kit.css' ]

darklow avatar Jul 13 '16 17:07 darklow

Just change https://github.com/darklow/social-share-kit/blob/08b26dbcce63cd4e7bbdd2a661e3186e49c9fb1a/package.json#L5 to

"main": "dist/js/social-share-kit.min.js"

(It's an array now, which NPM started to hate recently...)

alexandernst avatar Jul 13 '16 17:07 alexandernst

Thank you @alexandernst @kennynaoh just pushed recent version to npm as well: https://www.npmjs.com/package/social-share-kit

darklow avatar Jul 13 '16 18:07 darklow

@kennynaoh Social share kit also requires .CSS fail along with .JS file. How can it be obtained from npmjs if there is no mention about in package.json? I am not familiar with cdnjs submit process.

darklow avatar Jul 13 '16 18:07 darklow

@darklow NPMJS is just a registry. You upload the entire package, not just the file listed in main.

alexandernst avatar Jul 13 '16 18:07 alexandernst

Oh sorry @alexandernst and @kennynaoh, i meant how does cdnjs knows which files to include if there is no mention of .CSS file in package.json.

As an answer to the original question - yes this is officially maintained on npm.

darklow avatar Jul 13 '16 18:07 darklow

All files (recursively) from the directory where the package.json file is located are included in the package. El El mié, 13 jul 2016 a las 20:28, Kaspars Sprogis < [email protected]> escribió:

Oh sorry @alexandernst https://github.com/alexandernst and @kennynaoh https://github.com/kennynaoh, i meant how does cdnjs knows which files to include if there is no mention of .CSS file in package.json

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/darklow/social-share-kit/issues/48#issuecomment-232444861, or mute the thread https://github.com/notifications/unsubscribe/AAFef_b_ALUnAS6_-2S1YTgbN7ANC9Zzks5qVS5HgaJpZM4JLf5B .

alexandernst avatar Jul 13 '16 18:07 alexandernst

Thanks @darklow , @alexandernst , Sorry for late reply. @darklow I found that the latest release on github is v1.0.10, but the latest release on npm is v0.9.0. Please help me publish the latest version on npm, then I will host this library. Thank you!

kennynaoh avatar Sep 10 '16 03:09 kennynaoh

Published latest version to npm: https://www.npmjs.com/package/social-share-kit

darklow avatar Sep 10 '16 08:09 darklow

Thanks a lot

kennynaoh avatar Sep 10 '16 14:09 kennynaoh