Hi all,

I was working again this weekend on getting dojo boilerplate up and
running with 1.7.0b5. Things are improving! There are still some issues:

1. Configuring the loader using a second JS file inside the package
directory (included using <script src="js/app/boot.js"> on the client)
does not work after a build. When this file is inside a package
directory, it gets wrapped in a define() call (I assume this is some
legacy module compatibility shim?). When the file is *not* inside a
defined package directory, it is not copied to the output directory by
the build system. This latter behaviour seems to break any code that
doesn?t explicitly define packages in the build profile, even though
this is ostensibly allowed by AMD.

For the moment, to fix this issue, I am keeping the boot.js file outside
any packages and manually copy it over with a shell script. I would be
happy to hear opinions about a better way to have a loader configuration
that will work on both client and server without requiring repetition
and preferably without any extra HTTP request *just* for the
configuration data after a build is done.

2. dojo/resources/dojo.css is being skipped by the CSS optimizer for
some reason instead of being interned. claro.css interns correctly.

3. ?warn(205) Module not tagged as pure AMD yet it contains AMD API
applications.? What is this? What does it mean? How does a module get
?tagged? as pure AMD? I am confused. :)

Anyway, I don?t think any of these are necessarily 1.7 blockers, but I
wanted to make sure I shared my experience. The current code is at
<https://github.com/rmurphey/dojo-boilerplate/tree/amd1.7> if you need
context for some things I discussed. If something is unclear, please
ask, my brain is a bit tired right now. :)

Cheers,

--
Colin Snover
http://zetafleet.com

Search Discussions

  • Ben hockey at Sep 19, 2011 at 10:32 am
    hi colin,

    there's no way you should have been expected to have known this (i
    stumbled upon it at some point) but if you take a look at
    dojox/package.json, you'll see a dojoBuild property - it points to
    "dojox.profile.js". this is a "magical" file that tells the build tool
    some important information. if you can decipher what its trying to do
    you'll find that you can fix 1 and 3 via using this file. specifically,
    you want to make sure that js/app/boot.js gets included in those things
    which are marked copyOnly and you want to make sure that all those files
    that are warned about not being tagged as AMD somehow get included in
    the amd tagging. note, there is no hard rules about the name of the
    file since you can point the dojoBuild property in package.json to any
    file you want.

    http://bugs.dojotoolkit.org/changeset/26212/dojo is a changeset where i
    updated dojox.profile.js to remove all of those warnings *at that
    time*. since then, a number of dojox projects have been converted to
    amd but the dojox.profile.js has not been updated to account for this.
    dojo and dijit have their own counterparts of these files but i pointed
    you at dojox because it needs updating so please feel free to update
    dojox.profile.js if you get a chance while you're looking at it.

    once you've looked at it, it may be possible that you will be only the
    3rd person who know what it does :) (rawld, any docs for the build tool?)

    thanks,

    ben...
    On 9/18/2011 11:30 PM, Colin Snover wrote:
    Hi all,

    I was working again this weekend on getting dojo boilerplate up and
    running with 1.7.0b5. Things are improving! There are still some issues:

    1. Configuring the loader using a second JS file inside the package
    directory (included using<script src="js/app/boot.js"> on the client)
    does not work after a build. When this file is inside a package
    directory, it gets wrapped in a define() call (I assume this is some
    legacy module compatibility shim?). When the file is *not* inside a
    defined package directory, it is not copied to the output directory by
    the build system. This latter behaviour seems to break any code that
    doesn?t explicitly define packages in the build profile, even though
    this is ostensibly allowed by AMD.

    For the moment, to fix this issue, I am keeping the boot.js file outside
    any packages and manually copy it over with a shell script. I would be
    happy to hear opinions about a better way to have a loader configuration
    that will work on both client and server without requiring repetition
    and preferably without any extra HTTP request *just* for the
    configuration data after a build is done.

    2. dojo/resources/dojo.css is being skipped by the CSS optimizer for
    some reason instead of being interned. claro.css interns correctly.

    3. ?warn(205) Module not tagged as pure AMD yet it contains AMD API
    applications.? What is this? What does it mean? How does a module get
    ?tagged? as pure AMD? I am confused. :)

    Anyway, I don?t think any of these are necessarily 1.7 blockers, but I
    wanted to make sure I shared my experience. The current code is at
    <https://github.com/rmurphey/dojo-boilerplate/tree/amd1.7> if you need
    context for some things I discussed. If something is unclear, please
    ask, my brain is a bit tired right now. :)

    Cheers,

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdojo-contributors @
categoriesdojo
postedSep 18, '11 at 11:30p
activeSep 19, '11 at 10:32a
posts2
users2
websitedojotoolkit.org

2 users in discussion

Colin Snover: 1 post Ben hockey: 1 post

People

Translate

site design / logo © 2022 Grokbase