This page lists common commands, formats, aliases, and brief descriptions of mbler. Most commands need to be set up or go to the working directory first (see 'checkout / -c'). If you run commands frequently in your dev repository, it is recommended to use 'npm link' to link your local mbler to global commands (see tips below).
Important
node index.js<cmd>, it is recommended to run npm link in the root directory of the repository, and then you can use mbler <cmd>.Command overview
| Command | Usage | Alias | Description |
|---|---|---|---|
| checkout | `mbler checkout <PATH | null>` | -c |
| build | mbler build | --- | Package the current working directory (build behavior package/resource). |
| init | mbler init | -i | Initialize the project skeleton in the current working directory (interactive). |
| version | mbler version | — | Displays the version of the current working directory item (version in the package or MBLER configuration). |
| v | mbler v | -v | Displays the version of the MBLER tool itself |
| clean | mbler clean | cln | Clean up temporary files and output traces generated by the build |
| web_edit | mbler web_edit | — | {BETA} Launches the local web code editor (experimental feature). |
| install | `mbler install <git-url | local path >` | — |
| add | mbler add<package-name> | Add a declaration of installed dependencies in the configuration of the current working directory (add the dependencies to the project reference). | |
| remove | mbler remove<package-name> | — | Remove dependency claims from the current working directory configuration (do not delete installed packages). |
| uninstall | mbler uninstall<package-name> | Delete the installed dependency package (removed from the dependency repository). | |
| dev | mbler dev | — | Enable development mode: listen to source code changes and compile/build in real time (for local debugging). |
| recache | mbler recache | — | Reset cache |
| help | mbler help<命令名> | — | See help for the command |
| lang | mbler lang' <语言名> | — | switch language |
| create | `mbler create <git repo | dir | npm package>` |
| Common examples |
# Switch to the MyProject directory and make it your current working directory
mbler checkout ./myproject
# checkout is too long, -c is recommended
mbler -c ./myproject
# Check the current working directory
mbler -ccd ./myproject && mbler -c ./
mbler init# Switch to Chinese Simplified, others en English
mbler lang zh
mbler help lang# Build the current working directory
mbler build# Install dependencies from a remote git repository (pull packages into local dependencies repositories)
mbler install https://github.com/owner/dep-repo.git
# Local path installation (commonly used in development)
mbler install .. /local-dep
# Declare installed dependencies in the project (add them to the project configuration)
mbler add gameLib
# Remove dependency declarations from the project configuration
mbler remove gameLib
# Uninstall installed dependency packages (removed from local dependency repositories)
mbler uninstall gameLib# Enter development mode to automatically listen and build
mbler devOther Notes and FAQs
npm link, make sure that the global npm bin is in the system PATH. Linux/macOS can be confirmed with which mbler and Windows can be confirmed with 'where mbler'.mbler -c ./ before using it.