The NPM command-line interface tool
Royale CLI is a command-line tool that makes creating and compiling applications easier for users of NPM{:target=‘_blank’}, the JavaScript package manager.
If you have not installed Royale already, use this command in the command window:
npm install @apache-royale/royale-js -g
Then run:
npm install @apache-royale/cli -g
For information at any time about available commands and options, run:
royale help
Navigate in the command window to the directory where you want to create the new application, called here my-royale-app
, then run:
royale new my-royale-app
This creates a new directory structure using the name of the application, and creates a basic app with one main file: my-royale-app/src/Main.mxml
.
To review the app structure so far, navigate into the new direcctory:
cd my-royale-app
Navigate in the command window into your application's directory.
To compile and run in debug mode, run:
royale serve:debug
Royale:
bin/js-debug
directory.http://localhost:3000
.src
folder. When any file changes, Royale will recompile the app and reload the browser to show the updated application.To compile and run in release mode, run:
royale serve:release
Royale:
bin/js-release
directory.http://localhost:3001
.