MootCycle wrote:
> I figured this issue out myself by looking at the example.json,
> application.json, and the base.json files in the SDK. In case anyone else
> has the same issue I did, the way I ended up solving this was to define my
> own job with the appropriate settings in the JSON file and then to call the
> build source job from my job. There may be another way to do this, but my
> application is working now. Here's the full config.json file:
>
> {
>   "name"    : "client",
>
>   "include" :
>   [
>     {
>       "path" :
> "../../../../../../qooxdoo-0.8-sdk/tool/data/config/application.json"
>     }
>   ],
>
>   "let" :
>   {
>     "APPLICATION"  : "client",
>     "QOOXDOO_PATH" : "../../../../../../qooxdoo-0.8-sdk/framework",
>     "QOOXDOO_URI"  : "../${QOOXDOO_PATH}",
>     "QXTHEME"      : "qx.theme.Modern",
>     "API_EXCLUDE"  : ["qx.legacy.*"],
>     "LOCALES"      : [ "en" ],
>     "ROOT"         : "."
>   },
>   
>   "jobs" :
>   {
>     "my-source" :
>     {
>       "compile-source" :
>       {
>         "file" : "source/script/client.js",
>         "root" : "../../../..",
>         "locales" : ["en"],
>         "gzip" : false
>       },
>       
>       "run" :
>         [
>           "source"
>         ]
>     }
>   }
> }
>
>
>   

This is stark, Dan! I'm glad it works for you, but I don't recommend 
this as a general strategy.

For one thing you defined a "run" job, which is fine. But you have to be 
aware that every run job is (recursively) replaced by it's subjobs (the 
jobs in the run list). But: Whatever you specify in the initial "run" 
job becomes part of the replacing jobs (The "run" job is replaced by as 
many copies of itself as there are subjobs, and each copy "extend"s the 
corresponding subjob). That means that every job that "my-source" is 
eventually replaced by will have a "compile-source" key and will run the 
compile task! This is normally not what you want.

In this particular case it didn't matter since the "source" job from 
base.json just runs "source-script", which is a "compile-source" job 
itself, so you are effectively shaddowing one "compile-source" key with 
another, which is fine. But imagine applying the same technique to the 
"build" job...

Here's a little quiz for everybody:
How many times would the compiler generate the build/script/<name>.js 
file if you applied the same strategy to the "build" job? How could you 
overcome this problem?

Cheers,
Thomas

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to