superdweebie
superdweebie

Reputation: 1576

Building dojo 1.8 with two level package path

I am trying to use dojo build tools to create a release structure something like this:

relDir
  ->dojo
  ->dijit
  ->dojox
  ->mynamespace
     ->package1
     ->package2

In the build profile, I give the following directions:

"packages":[
    {
        "name":"dojo",
        "location":"vendor\/dojo\/dojo"
    },
    {
        "name":"dijit",
        "location":"vendor\/dojo\/dijit"
    },
    {
        "name":"dojox",
        "location":"vendor\/dojo\/dojox"
    },
    {
        "name":"mynamespace\/package1",
        "location":"vendor\/mynamespace\/package1"
    },
    {
        "name":"mynamespace\/package2",
        "location":"vendor\/mynamespace\/package2"
    }
]

However the build tool doesn't seem to like the two part package name, and spits out a directory structure like this:

relDir
   ->dojo
   ->dijit
   ->dojox
   ->mynamespace
       ->package1
           All package1 copyOnly files
       ->package2
           All package2 copyOnly files
   ->package1
       All package1 js and uncompressed.js files, but all files are empty
   ->package2
       All package2 js and uncompressed.js files, but all files are empty

If I alter the packages::name to remove mynamespace, then there are no empty js files, and the output directory structure is:

relDir
   ->dojo
   ->dijit
   ->dojox
   ->package1
   ->package2

How do I get the mynamespace directory into the built structure without the build tool breaking down?

Upvotes: 1

Views: 578

Answers (1)

superdweebie
superdweebie

Reputation: 1576

After digging through source, I found the solution - and it's simple. Need to use the destLocation key on the package directive. So:

"packages":[
    {
        "name":"dojo",
        "location":"vendor\/dojo\/dojo"
    },
    {
        "name":"dijit",
        "location":"vendor\/dojo\/dijit"
    },
    {
        "name":"dojox",
        "location":"vendor\/dojo\/dojox"
    },
    {
        "name":"mynamespace\/package1",
        "location":"vendor\/mynamespace\/package1",
        "destLocation": "mynamespace\/package1"
    },
    {
        "name":"mynamespace\/package2",
        "location":"vendor\/mynamespace\/package2",
        "destLocation": "mynamespace\/package2"
    }
]

Upvotes: 2

Related Questions