Monaca CLI is a local development environment that is used to develop Monaca apps locally. The Monaca CLI provides a command line interface for using Monaca Cloud from your local PC. With the Monaca CLI, you can:
- Create new local projects and import or clone existing projects fromMonaca Cloud to your PC.
- Develop Monaca apps with a local code editor you prefer.
- Debug your app with inspector integration.
- Support transpiler options for transpilable projects such as ReactJSand Angular2 projects.
- Remote build your projects without any local setup.
Use the following command to install the Monaca CLI:
$ npm install -g monaca
On some systems you may have to prefix the command with
sudobecause of a permission issue:
$ sudo npm install -g monaca
Currently, it is available for the Vue, React and Angular2 templates. It can be triggered in two ways:
monaca transpile: runs the transpiler on the current project.
monaca preview: runs the transpiler in watch mode and starts anHTTP server to display the app’s content.
You might sometimes want to exclude specific files and folders from the Monaca Cloud. When using Monaca, the
.monacaignorefile will be automatically created and placed under the root directory of the React Native projects. You can edit the file to add or remove specific files and folders.
.monacaignorefile looks like this: