#14392 closed task (fixed)
add a nano.profile.js
Reported by: | ben hockey | Owned by: | Rawld Gill |
---|---|---|---|
Priority: | high | Milestone: | 1.9 |
Component: | BuildSystem | Version: | 1.7.0 |
Keywords: | Cc: | James Thomas | |
Blocked By: | Blocking: |
Description
similar to amd.profile.js added in #14381 we should have a nano.profile.js that demonstrates how to produce a dojo.js that is < 4kb gzipped, minified.
Attachments (1)
Change History (14)
comment:1 Changed 8 years ago by
Milestone: | → 1.8 |
---|---|
Status: | new → assigned |
comment:2 Changed 7 years ago by
Milestone: | 1.8 → 2.0 |
---|
comment:3 Changed 7 years ago by
comment:4 Changed 7 years ago by
I was thinking having it be a CDN available file would be even more important.
comment:5 Changed 7 years ago by
it's not a bad idea to make it easily available, we just need to make the caveats very clear
- certain features don't exist
- custom build is a better idea (less HTTP requests)
- etc
comment:6 Changed 7 years ago by
Cc: | James Thomas added |
---|
comment:7 Changed 7 years ago by
Based on discussion on dojo-contribs, here's the "nano" built profile with dojo-config-api and ie-event-behaviour flags still enabled to make it more usable. Full list of features specified rather than minimal set to help users understand what flags are available.
comment:8 Changed 7 years ago by
james,
we should leave ie-event-behavior
completely out of the profile. by setting it to 1
you're removing the addEventListener
(that is, not ie-event-behavior
) paths.
comment:9 Changed 7 years ago by
i also noticed that with dojo-sniff: 0
there are cases where a user must set the baseUrl
- eg if the page is at mysite.com/index.html and the code is at mysite.com/code/dojo/dojo.js, then the baseUrl needs to be set to /code to work. not sure if we should change the setting but thought it was worth mentioning here in case we build up a list of common gotchas when using this profile.
comment:10 Changed 7 years ago by
Good catch Ben, I'll update the profile and add the new attachment.
comment:13 Changed 7 years ago by
Thanks James and Ben!
I did some quick tests with the built code by also building dijit with copyTests. It was necessary to set the baseUrl (as expected) in the test html files, but they loaded correctly (e.g. Calendar, Calendar Lite).
Fwiw, the resulting loader (dojo.js) is 5K zipped. Not bad with still-a-lot-of-stuff-that-will-go-in-2-point-oh.
Should we also consider posting the result to the website, to lower the barrier for people to try it out?