Hi Phillipe,
> I'd like to have an intermediate job, between "generate source" and > "generate build": it's not the source job because I need all the classes > used to be in the target directory (the script runs with a reference to > qooxdoo sdk), and it's not the build job because I need the target code > to be as in the source (readable). Basically, it's like the source, but > standalone. > > I'm not sure if it is possible (I'm afraid it's not), but at least I'd > like to get a readable target code; there are some options > http://qooxdoo.org/documentation/0.8/generator_config_ref#compile-dist > for that purpose, but I didn't yet understand how to overwrite > "optimize" : [] > > So far, my config.json file looks like this: > > "build" : > { > "extend" : ["include-contrib", "appconf::build"], > "run" : > [ > "appconf::build", > "build-files" > ] > }, > ("build-files" refers to a custom operation) > > How to write a new job "buildsrc" that extends this one, and that set > "optimize" : [] for the task compile-dist ? > > "buildsrc" : > { > "extend" : ["build"], > ...and now ? > Ok, I'm not sure I get everything you want to achieve, but lets start at some point and then see how we proceed... For one thing, it seems helpful in your case to *not* use the entire appconf::build job, but to dissect it. appconf::build is essentially tree jobs, of which you have already "overloaded" one, build-files. You could easily copy "build-resources" over to your own config.json (from base.json). Then, as the main point, you could re-define "build-script". The appconf::build-script job is the one you actually want to re-define. It contains the action key "compile-dist". You have to basically duplicate the job in your own config file. Then you can e.g. set "optimize" = [], and leave "format" = "on". So, what I'm suggesting in your config.json is: "build-files" : {...}, // as you have it "build-resources" : {...}, // copy from base.json "build-script": { // copying in some more settings, to get rid of appconf::common etc, dependency "let" : { "CACHE" : "cache", "QXTHEME" : "qx.theme.Classic", "LOCALES" : [ "en" ], "BUILD_PATH" : "${ROOT}/build" }, "library" : [ { "manifest" : "${QOOXDOO_PATH}/Manifest.json", "uri" : "${QOOXDOO_URI}" }, { "manifest" : "${ROOT}/Manifest.json", "uri" : ".." } ], "include" : [ "${APPLICATION}.Application", "${QXTHEME}" ], "cache" : { "compile" : "${CACHE}" }, "settings" : { "qx.version" : "${QXVERSION}", "qx.theme" : "${QXTHEME}", "qx.application" : "${APPLICATION}.Application" }, "variants" : { "qx.debug" : ["off"] }, "compile-dist" : { "target" : "${BUILD_PATH}", "file" : "${BUILD_PATH}/script/${APPLICATION}.js", "uri" : "script/${APPLICATION}.js", "root" : "${BUILD_PATH}", "format" : "on", "locales" : "${LOCALES}", "optimize" : [] } }, "buildsrc" : { "extend" : ["include-contrib"], "run" : ["build-script", "build-resources", "build-files" ] } As you can see, I've copied some more settings and "let" macros into the build-script job, to resolve dependencies from the base.json file. Maybe you have to tweak some of the macros or settings for your environment. Still, even with these settings you get as the output of the job two Javascript files like "custom.js" and "custom-0.js". The first contains the startup code, the second contains the actual class code. But all classes are packed into a single file, so it is not exactly like the source files (where each class retains its own file). Also, the formatting is not really retained, and comments are stripped. Is this enough for you? 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
