basket.js
basket.js copied to clipboard
Implement basket with AMD module system
- Implement basket with amd module system, so that: …
- We can swap out rsvp with compact promise implementation easily for the full package, the basket.full.min.js now became much much smaller than before. 5.20KB (now, minified) v.s. 14.6 KB(when it is with RSVP, minified)
- Because of swapping out RSVP, there is no extra global pollution, original RSVP will overwrite any existing RSVP
- Its easier for AMD user to use the "source code version" of basket.js
(simply
require(['pathtobasket/src/basket'])
) - Support UMD header so everyone benefits?
By doing this change, the standalone basket doesn't get bloated too much by this change (3.2KB now v.s. 3.1KB previously)
for some reason travis just doesn't happy with my gruntfile, will try fix it later
travis issue fixed