Aerolab / midnight.js

Switch your nav's design on the fly
http://aerolab.github.io/midnight.js/
Other
3.67k stars 380 forks source link

npm publish #40

Closed fregante closed 9 years ago

fregante commented 9 years ago

Hello, could you publish this to npm? You only need to add a main field to package.json and run npm publish

Also, what is the src file? How is it different from the non-src file?

RobertoGonzalez commented 9 years ago

Done! The non-src file is just the src with the license pasted on top (just before minification). I moved those files to ./src and ./dist for clarity. I'm going to leave them in the root for a while in case someone's still linking to those.

fregante commented 9 years ago

Oh no! Now you have 4 copies of what's essentially the same file, that didn't clarify much :(

Why not just have the normal file with the license included, to keep things simple?

RobertoGonzalez commented 9 years ago

I may have made things worse with that last commit D: I'll work on it later today so I don't end up breaking anything (frankly I'd just drop the files on the root to keep things more organized).

fregante commented 9 years ago

You can probably do that. Bower has a main field that you can update, and nobody is using it from npm yet. People who downloaded it directly won't be affected because they won't automatically receive the breaking update.

I'd suggest just having midnight.jquery.js (the source file) and midnight.jquery.min.js in the root, no need for the folders since they are just two files.

RobertoGonzalez commented 9 years ago

That's actually a good idea. I also added mention of Bower and NPM in the Readme since they were absent for some reason. Thanks for the tip!

fregante commented 9 years ago

One last thing! The main field of package.json should point to the non-minified version. That field is used by node/browserify/webpack users and they usually have a minifier on their pipeline, so no need to include it already-minified. I swear I read somewhere that that's the desired behavior of main but I can't find the article/page that mentioned it :(

weotch commented 8 years ago

:+1: on pointing to non-minified version. @bfred-it i know i saw that same note but also couldn't find it in 10min of searching.