SkidX / tweene

JavaScript Animation Proxy
http://tweene.com
Artistic License 2.0
353 stars 29 forks source link

npm package? #1

Closed dan-dr closed 9 years ago

dan-dr commented 9 years ago

no support for webpack / browserify is a major downer

SkidX commented 9 years ago

Hi dan, I agree, it was already in my to-do list.

I was thinking to create also a different package for each supported library, so for example if you want to use Tweene only with GSAP you can require "tweene-gsap" (which will depend only on gsap module) without being forced to include all the other libraries as requirements. So it will result in these packages: tweene-all [dependencies: jquery, velocity, transit, gsap] tweene-gsap [dependencies: gsap] tweene-transit [dependencies: transit, jquery] tweene-velocity [dependencies: jquery, velocity] tweene-jquery [dependencies: jquery]

Do you think it is a good idea?

dan-dr commented 9 years ago

Better to do 1 package with the bundle and the dedicated libraries. So you can do:

var tweene = require('tweene')
var tweene_velocity = require('tweene/velocity');

The first line will require the index which itself requires each of the dedicated libraries. and the second line will require only the dedicated.

SkidX commented 9 years ago

Seems better by far, I did not know that option, thanks!

SkidX commented 9 years ago

Done. Please let me know if there is any problem.