Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement basket with AMD module system #167

Open
wants to merge 4 commits into
base: gh-pages
Choose a base branch
from

Conversation

normanzb
Copy link

@normanzb normanzb commented May 5, 2016

  1. Implement basket with amd module system, so that: …
  2. 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)
  3. Because of swapping out RSVP, there is no extra global pollution, original RSVP will overwrite any existing RSVP
  4. Its easier for AMD user to use the "source code version" of basket.js
    (simply require(['pathtobasket/src/basket']))
  5. 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)

normanzb added 2 commits May 5, 2016 23:01
2. Its easier for AMD user to use the source code version of basket.js
(simply `require(['pathtobasket/src/basket'])`)
3. The basket.full.js became much much smaller than before 5k vs
11k(original), because of swapping out RSVP with compact-promise
4. Support UMD header so everyone gets benefit?
5. The standalone basket doesn't get bloated too much by this change
(around 0.1k)
@normanzb
Copy link
Author

normanzb commented May 5, 2016

for some reason travis just doesn't happy with my gruntfile, will try fix it later

@normanzb
Copy link
Author

normanzb commented May 6, 2016

travis issue fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant