laoban-dev

Installing

Laoban Cheatsheet

Command Guarded? Purpose
laoban update No Makes sure that the packages are in line with the templates
laoban update --minor No Updates the version number of the packages. Usually before doing a laoban publish
laoban update --major No Updates the version number of the packages for a major release. Usually before doing a laoban publish
laoban clean No cleans up the directories and files that laoban uses as temporary storage
laoban compile details.compile Compile all the typescript projects in the correct order
laoban test details.test Test all the typescript projects in the correct order
laoban publish details.publish Publishes the projects to npm (requires NPM_TOKEN environment variable setting)
laoban status No Show the status of important commands (compile/test) across all projects
laoban run 'file:rmDir(node_modules)' No In linux remove all the node modules from the project (be careful)

Adding a new package to an existing laoban project

Command Purpose
laoban admin newpackage <directory> the specified directory is created if needed and turned into a package. Options can be used to control the template and the package name
laoban admin newpackage the current directory is turned into a package. Options can be used to control the template and the package name。 Or you can just inspect and edit the package.details.json file afterwards (and run laoban update after editing)
laoban admin newpackage -p <packageName> the current directory is turned into a package. The name of the package is set to <packageName>
laoban admin newpackage --template <template> the current directory is turned into a package. The template of the package is set to <template>
laoban admin templates shows the available templates usable in the –template option above

Changing a dependency in a template

For example the version of typescript or the version of react

Adding dependencies to all packages using a specific template

Make a new template from scratch

Usually we want to extend a template (for example we might just want to update a dependency as above)

Rarely used tasks

Command Purpose
laoban admin clearcache Used to clear the cache of the files loaded from urls. Unless they have changed there is little value in this
laoban admin profile Show the time taken to do important tasks across all packages