Home

wq build

wq version: 0.7.8 1.0 1.1
Docs > wq.app: Build Tool

wq build

wq.app.build

wq is a configuration-based command-line tool that can be used to compile application code into a compact offline-capable format. It is included in wq.core and should be available from the command line after installing wq or wq.app.

wq.app provides a number of wq commands for creating and optimizing offline-capable web apps, the most notable of which is the wq build command. The main usage of wq build is as follows:

wq -c [configfile] build [version]

Where:

The actual build process is broken into several steps. Each step is typically configured via a corresponding key in the wq.yml configuration file, though most accept the same options as command-line arguments. You can get more information about the options for each command via wq --help, for example:

wq init --help
Option Usage
init Prepares the project for build by adding symbolic links from the project folder to the wq assets.
setversion loads the application version from a version.txt file (or from the command line) and creates a simple AMD module (typically called version.js)
collectjson collects the contents of files a directory into a single JSON or JavaScript (JSONP/AMD) file.
scss compiles SCSS into regular CSS, useful for creating custom jQuery Mobile themes.
mustache compile a Mustache template and context into a static HTML page.
optimize Resolves Javascript and CSS dependencies to build single "minified" files using a bundled version of the RequireJS optimizer (r.js). Requires node.js
appcache Creates HTML5 application cache manifests for both the source and compiled applications by examining the logs from build process.
build runs all of the above in order.