Opened 8 years ago

Closed 7 years ago

Last modified 7 years ago

#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)

nano.profile.js (1.3 KB) - added by James Thomas 7 years ago.
Useable nano build profile

Download all attachments as: .zip

Change History (14)

comment:1 Changed 8 years ago by Rawld Gill

Milestone: 1.8
Status: newassigned

comment:2 Changed 7 years ago by Rawld Gill

Milestone: 1.82.0

comment:3 Changed 7 years ago by Adam Peller

Should we also consider posting the result to the website, to lower the barrier for people to try it out?

comment:4 Changed 7 years ago by dylan

I was thinking having it be a CDN available file would be even more important.

comment:5 Changed 7 years ago by ben hockey

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 James Thomas

Cc: James Thomas added

comment:7 Changed 7 years ago by James Thomas

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 ben hockey

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 ben hockey

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 James Thomas

Good catch Ben, I'll update the profile and add the new attachment.

Changed 7 years ago by James Thomas

Attachment: nano.profile.js added

Useable nano build profile

comment:11 Changed 7 years ago by dylan

Milestone: 2.01.9

Is there any reason to not land this in 1.9?

comment:12 Changed 7 years ago by Rawld Gill

Resolution: fixed
Status: assignedclosed

In [31276]:

added nano profile; big thanks to jamesthomas and neonstalwart; fixes #14392

comment:13 Changed 7 years ago by Rawld Gill

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.

Note: See TracTickets for help on using tickets.