Search code examples
buildmoduledojolayeramd

How to build a Dojo layer against an existing layer file?


I'm using Dojo 1.9, and am happily building layer files using the Dojo builder. What I'd like to be able to do is build my layer files containing my modules which refer to third party modules, but where I only have pre-built layer files containing those modules rather than the individual third party module files.

(There are two reasons for wanting this: sometimes I don't have the individual module files, just the layer files, and sometimes even if I do have the individual module files, I have no intention of bundling them into my layer, and so don't want to increase the build time by having the builder scan all of those module files.)

If I have the raw module-by-module source for those third party modules, I can make it all work fine, but can it be made to work if I only have the pre-built Dojo layer?

I've tried specifying 'exclude' options in my layer specification, but that seems to affect which modules are generated into my layer rather than which modules it tries to locate as individual module files.

Is there a way to do this?


Solution

  • A bit late, though hoping this may be of any help to someone. Facing the same absence of relevant answer, I eventually gave up trying to get it done with the builder, especially given that my 3rd party wouldn't build even by itself. Instead, I set up grunt-contrib-concat to output AMD layers, and built a project with it, while caring to explicitely reference the library layers within dojoConfig.

    https://github.com/mdolidon/grunt-amd-concat