qooxdoo Generator Cheat Sheet - v.0.8.3-1

Document Sample
qooxdoo Generator Cheat Sheet - v.0.8.3-1 Powered By Docstoc
					qooxdoo Generator Cheat Sheet - v.0.8.3-1                                               “api” : {...},
                                                                                        “asset-let” : {...},
                                                                                                                                          {
                                                                                        “cache” : {...},
                                                                                                                                           "images" :
This cheat sheet summarizes the options available for the                                                                                  {
                                                                                        “clean-files” : {...},
generator and its Json config files.                                                    “combine-images” : {...},                            "<output_image>" :
                                                                                        “compile-dist” : {...},                              {
Generator Options                                                                       “compile-source” : {...},
shell> generator.py -h                                                                  “copy-files” : {...},                                  "input" : [ "<path>", "<path>" ],
Usage: generator.py [options] job,...                                                   “copy-resources” : {...},                              "layout": ("horizontal"|"vertical")
                                                                                        “dependencies” : {...},                              }
                                                                                        “desc” : “<descriptive text>”,
Arguments:
                                                                                        “exclude” : [...],
                                                                                                                                           }
 job,...             a list of jobs (like 'source' or 'copy-files',                     “export” : [...],                                 }
                     without the quotes) to perform                                     “extend” : [...],
    x                use 'x' to get a list of all available jobs                        “fix-files” : {...},                              "compile-dist" :
                     from the configuration file                                        “include” : [...],
                                                                                        “let” : {...},                                    {
Options:                                                                                “library” : [...],                                 "paths" :
                                                                                        “lint-check” : {...},                              {
 -h, --help     show this help message and exit
                                                                                        “log” : {...},
 -c CFGFILE, --config=CFGFILE                                                           “migrate-files” : {...},
                                                                                                                                             "file"  : "<path>",
               path to configuration file containing job definitions                    “packages” : {...},                                  "gzip"    : (true|false)
               (default: config.json)                                                   “pretty-print” : {...},                            },
 -q, --quiet   quiet output mode (extra quiet)                                          “require” : {...},                                 "uris" :
 -v, --verbose verbose output mode (extra verbose)                                      “run” : [...],
                                                                                        “settings” : {...},                                {
 -l FILENAME, --logfile=FILENAME
               log file                                                                 “shell” : {...},                                     "script" : "script",
                                                                                        “slice-images” : {...},                              "resource" : "resource"
Default Jobs                                                                            “translate” : {...},
                                                                                        “variants” : {...}
                                                                                                                                           },
    - api       -- create api doc for the current library                                    }                                             "code" :
    - build     -- create build version of current application                             }                                               {
    - clean     -- remove local cache and generated .js files                           }
                    (source/build)                                                                                                           "format" : (true|false),
    - distclean -- remove the cache and all generated artefacts of                                                                           "locales" : ["de", "en"],
                     this library (source, build, ...)                                  Config Keys                                          "optimize" : ["variables", "basecalls", "privates",
    - fix       -- normalize whitespace in .js files of the current library (tabs, eol,
                    ...)                                                                "api" :                                           "strings"]
    - inspector -- create an inspector instance in the current library                  {                                                  }
    - lint      -- check the source code of the .js files of the current library
                                                                                          "path" : "<path>"                               }
    - migration -- migrate the .js files of the current library to the current qooxdoo
                     version                                                            }
    - pretty     -- pretty-formatting of the source code of the current library                                                           "compile-source" :
    - profiling -- includer job, to activate profiling                                  "asset-let" :                                     {
    - source     -- create source version of current application
                                                                                        {                                                  "file" : "<filepath>",
    - source-all -- create source version of current application, with all classes
    - test       -- create a test runner app for unit tests of the current library        "<macro_name>"      : [ "foo", "bar", "baz" ]    "root" : "<path_to_html_dir>",
    - test-source -- create a test runner app for unit tests (source version) of the }                                                     "locales" : ["de", "en"],
                         current library                                                                                                   "gzip" : (true|false)
    - translation -- create .po files for current library                                                                                 }
                                                                                 "cache" :
                                                                                 {
                                                                                  "compile"   : "<path>",                                 "copy-files" :
                                                                                  "downloads" : "<path>"                                  {
Config File Layout
                                                                                 }                                                         "files"  : [ "<path>", "<path>" ],
This is the general layout of a config file:                                                                                               "source" : "<path>",
{
     “name” : “<descriptive text>”,                                              "clean-files" :                                           "target" : "<path>"
     “include” : [                                                               {                                                        }
       { “path”    : “<os path>”,
          “as”     : “<library prefix>”,                                          "<doc_string>" :
          “import” : [<job>,...{“name”:<job>, “as”:<alias>},..],                  [                                                       "copy-resources" :
          “block” : [<job>,...]                                                     "<path>",                                             {
       }
                                                                                    "<path>"                                               "target" : "<path>"
     ],                                                                                                                                   }
     “let” : { <macro> : <value>, ...},                                           ]
     “export” : [<job>,...],                                                     }
     “jobs” : {                                                                                                                           "dependencies" :
       <job> : {                                                                                                                          {
                                                                                 "combine-images" :
 "follow-static-initializers" : (true|false)         "privates"   : ("on"|"off"),                         }
}                                                    "dependencies" : ("using"|"used-by"|"off")
                                                    }                                                     "run" : [ "<job1>", "<job2>", "<job3>" ]
"desc" : "Some text."                                                                                     "settings" :
                                                    "migrate-files" :                                     {
"exclude" : ["qx.util.*"]                           {                                                      "qx.application" : "myapp"
                                                      "from-version" : "0.7",                             }
"export" : ["job1", "job2", "job3"]                   "migrate-html" : false
                                                    }                                                     "shell" :
"extend" : [ "job1", "job2", "job3" ]                                                                     {
                                                    "packages" :                                           "command" : "echo foo bar baz"
"fix-files" : {}                                    {                                                     }
                                                     "parts" :
"include" : ["qx.util.*"] // job-level               {                                                    "slice-images" :
                                                       "<part_name>" : [ "app.class1", "app.class2.*" ]   {
"include" : // top-level                             },                                                    "images" :
[                                                    "sizes" :                                             {
  {                                                  {                                                       "<input_image>" :
    "path" : "<path>",                                 "min-package" : 1,                                    {
    "as"   : "<name>",                                 "min-package-unshared" : 1                              "prefix"    : "<string>",
    "import" : ["extjob1", "extjob2", "extjob3"],    },                                                        "border-width" : 5
    "block" : ["extjob4", "extjob5"]                 "init"  : "<part_name>",                                }
  }                                                  "collapse" : [ "<part_name1>", "<part_name2>" ]       }
]                                                   }                                                     }

"jobs" :                                            "pretty-print" :                                      "translate" :
{                                                   {                                                     {
 "<job_name>" : { <job_definition> }                 "general" :                                           "namespaces" : [ "qx.util" ],
}                                                    {                                                     "locales"    : [ "en", "de" ]
                                                      "indent-string"     :" "                            }
"let" :                                              },
{                                                    "comments" :                                         "variants" :
 "<macro_name>" : "<string>",                        {                                                    {
 "<macro_name1>" : [ ... ],                           "trailing" :                                         "qx.debug" : [ "on" , "off" ]
 "<macro_name2>" : { ... }                            {                                                   }
}                                                       "keep-column"       : false,
                                                        "comment-cols"       : [50, 70, 90],              Full reference see:
"library" :                                             "padding"        :" "                             http://qooxdoo.org/documentation/0.8/generator_config_ref
[                                                     }
  {                                                  },
    "manifest" : "<path>",                           "blocks" :
    "uri"    : "<from_html_to_manifest_dir>",        {
    "namespace" : "<string>"                          "align-with-curlies" : false,
  }                                                   "open-curly" :
]                                                     {
                                                        "newline-before"    : "m",
"lint-check" :                                          "indent-before"    : false
{                                                     }
 "allowed-globals" : [ "qx", "${APPLICATION}" ]      }
}                                                   }

"log" :                                             "require" :
{                                                   {
 "classes-unused" : [ "custom.*", "qx.util.*" ],     "<class_name>" : [ "qx.util", "qx.fx" ]