Firstly you need to install nodejs and npm, then install grunt with command npm install -g grunt as we use grunt to run yomb tasks. At last use command npm install grunt-yomb --save-dev to install our builder.

Too many configarations bring in complexity and is hard to maintain, so we make some conventions to ease our work.We use "(example)" or "(dist, src)" to show an example. "src" links to source files, and "dist" links to built result files.

JS file of which name is "main" or end with "-main", "_main", ".main" is the target building file. For example, "main.js", "index-main.js", "index_main.js" and "index.main.js" are target building files (dist, src).

Dependancy module with relative path will be packaged with target building file. This process is recursive, which means if "main" requires "./foo", and "./foo" requires "./bar", then "main", "./foo" and "./bar" will be packaged together.
var foo = require('./foo');var bar = require('../bar');var vender = require('vender');
foo and bar will be packaged with target building file (dist, src).
If the output file is in the same folder, the output file names are "main-built.js", "index-main-built.js", "index_main_built.js" and "index.main.built.js" in order not to overwrite the orignal files, or else the output file name is the same as the target building file (example).

Html file of which name is end with '.tpl' is micro template file. This file will be built into AMD module file. For example, you have a file named "cargo-list.tpl.html", and you can require it as below.var cargoListTmpl = require('./cargo-list.tpl.html');
Then you can use it as below.$('cargo-list').innerHTML = cargoListTmpl.render(data);
As JS file, html file of which name is "main.tpl" or end with "-main.tpl", "_main.tpl", ".main.tpl" will be built into AMD module file. For example, "foo-main.tpl.html" will be built into "foo-main.tpl.html.js" (dist, src).

less file of which name is "main" or end with "-main", "_main", ".main" will be built into css file. For example, "foo-main.less" will be built into "foo-main.css" (dist, src).

Firstly you need to create a Gruntfile.js file (example) in the root filder of your project. Then add a "yomb" task in grunt file, then add some targets in yomb task. The name of a target should be start with "coffee-", "build-", "concat-" or "copy-". You can run yomb task with command grunt yomb.

copy- : copy files.
YOM builder is built on NodeJS. You can run it in command line like this:node path/to/builder.js
In "coffee-" and "build-" targets, you can set "ignore" property to ignore some folders or files.

--config-file filepath : In general builder does't need config file to work, It does traversal building in current working directory according to the rules. However, you can specify a config file to use advanced setting.

properties : This option defines reusable values.
eg. {"properties": {"a": {"b": {"c": 1}}}}
Defined values can be used as %{{a.b.c}}% in html source file and template.
"_lang_" is a special property, it is the language code being processed. You can use %{{_lang_}}% in html source file to include language resource file.
eg. <!-- include "lang/%{{_lang_}}%/foo.js" -->

YOM builder can build external JS and CSS file into Html file, in order to enhance the page performance by reducing http request amount. Html file of which name is end with ".src" is considerred the source file to be optimized, and the optimized result file will be output to the output folder with the name without ".src". Micro template file can also be optimized in this way. Below are instructions of optimization. Html file of which name is end with ".inc" is reusable html segment file, which can be included in the source file (dist, src).

include : Include an external file into the Html source file, the included file can also be Html source file, and the optimization is done recursively.
eg. <!-- include "./mod1.js" -->, <!-- include "./segment.inc.html" -->
You can even specify a plain-id to the instruction, in order to make the JS code not execuded immediately, and execude it on demand.
eg. <!-- include "./mod1.js" plain-id:mod1-script -->
The output will be <script type="text/plain" id="mod1-script">...
You can also use include in template file to mixin another template.
eg. <!-- include "./foo.tpl.html" -->

require : Require is an instruction for building AMD module into Html source file. It also supports plain-id.
eg. <!-- require "./mod1" -->