If you are new to a project that is managed by laoban then this is a short guide to getting started. The cheat sheet is also very useful
In a git project this would be just git clone xxx
laoban.json
fileVery often this is in the root directory. This is the ‘base’ directory of the project and when working with laoban
you
must be ‘in’ or ‘under’ this directory.
Either by windows with the ‘cmd’ or ‘powershell’ tools, or from your favourite IDE.
Details can be found here
See here for more details
laoban packages
yarn
at the command linelaoban npm_install
Note that to have access to laoban npm_install
your laoban.json
should include:
{
"parents": [
"https://raw.githubusercontent.com/phil-rice/laoban/master/common/laoban.json/npm.laoban.json"
]
}
laoban compile
This executes the compile
command (typescript compile) in each project.
laoban test
If you have many projects it might be difficult to determine from just looking at the output whether the project has
successfully compiled or executed it’s tests. That’s where laoban status
helps us
laoban status
In the case of the laoban
project itself it might give
test compile
modules/debug true true
modules/files true true
modules/generations true true
modules/laoban true true
modules/utils true true
modules/validation true true
modules/variables true true
It is very common in laoban
projects for some code to be in a library and the the using code be in a different
project. Let’s call these projects main
and library
.
We often change the code in the two places simultaneously. For example we need to change code in library
and we use it
in main
. Before executing a test or code in main
we probably need to compile the library
. This can be done by
laoban compile -p library
laoban test -p main