The CLI can be globally installed on your machine, so you can easily use it across projects.
npm install -g @myjsblock/cli
yarn global add @myjsblock/cli
myjsblock [command] [options]
Links your local directory to a Block Project, saving a credentials file in your project root.
Push your local project to the AppMachine server.
Displays helpful information for the available commands.
--token Block token for the AppMachine App.
--secret A Secret to login to the AppMachine server.
--overwrite Overwrites the credential and config files.
--help Displays complete help for [cmd].
--debug Helps debugging the CLI.
Instead of supplying the
--secretarguments, you may create a
myjsblock.credentials.jsonfile in your project directory.
If you use a version control system like Git, make sure you add the
myjsblock.credentials.jsonfile to the
.gitignorefile. This will prevent it from being saved in version control and is a good security measure.
Some advanced configuration requires a
myjsblock.config.jsonfile in your project directory. This enables you to change settings like
entryFilefor your project.
An example of such a file would be:
This changes the output directory for your project. The default value is
dist. The contents of this directory will be uploaded to the server by the CLI.