greensock / GSAP

GSAP (GreenSock Animation Platform), a JavaScript animation library for the modern web
https://gsap.com
19.85k stars 1.72k forks source link

Since you have bower can you do NPM? #58

Closed gooswa closed 10 years ago

gooswa commented 10 years ago

NPM seems to be more popular then bower, could you provide a package for NPM?

pakastin commented 10 years ago

+1

thecotne commented 10 years ago

WTF?

-1 for npm package of GreenSock

JonDum commented 10 years ago

NPM packages can be client side. I actually use a lot of client side libraries with npm. I setup Webpack to search through my node_modules folder for require() calls. So it'd be awesome if I could install gsap with npm i gsap then var TweenMax = require('TweenMax'), so +1

andreabedini commented 10 years ago

+1

gooswa commented 10 years ago

Yeah I feel like browserify is gaining momentum and since they follow the npm package for even client side ones there is no reason not to include it. It's helps to also use it for devDependencies since then I don't have to check those into the repo and people who download a take a quick look at only the package.json and understand what's being used the project. if it's thought to be confusing what is used for client side and server if you are using javascript for both that's why there is both devDependencies and dependencies in the package.json

jackdoyle commented 10 years ago

Yes indeed, I think this is a good idea. Got a proposed package.json file? I'm going 100mph on some other changes right now with GSAP and the new site, so if you'd like to accelerate things and shoot me a proposed file, it'd be swell.

gooswa commented 10 years ago

Yes definitely, keep doing what you are doing, just to clearify you want a package.json for the NPM repo correct?

jackdoyle commented 10 years ago

My understanding was that we need to add a package.json file to the github repository so that it conforms to the NPM guidelines. Disclaimer: I'm not much of a Node guy yet, so any advice is welcome, as is your patience :)

jackdoyle commented 10 years ago

Done.

JonDum commented 10 years ago

Just adding the package.json doesn't add the repo to the npm registry. You also need to run npm publish from within.

jackdoyle commented 10 years ago

Sorry about that. It should really be done now ;)

JonDum commented 10 years ago

No need to apologize. Looks good!

https://www.npmjs.org/package/gsap

(I would consider this closed)

edrex commented 9 years ago

ideally for the package to work well as an NPM module it should have a main key in package.json. Without this, you can't require('gsap').

Since NPM is big on "one module, one interface", it might make more sense to define a package for each of `(Tween|Timeline)(Lite|Max), each of which returns its interface.

pakastin commented 9 years ago

..or then like so:

var gsap = require('gsap')
var TweenMax = gsap.TweenMax
var TimelineMax = gsap.TimelineMax
jackdoyle commented 9 years ago

Hm, it looks like the package.json already has a "main" key defined - am I missing something?

We do hope to restructure things in the future to be more modular, but it's a much bigger project than we have time for right now. If you have specific recommendations for edits to the package.json file or something that'd make it more usable without a big restructuring of things, I'm all ears.

edrex commented 9 years ago

I missed the main key when I looked last, sorry for the distraction.