FrontHub CLI
The FrontHub CLI is a task runner. Before to use the commands below you'll need to install the front-hub-cli
globally or using npx.
Using Globally
You can run front-hub
without any arguments to see the help.
front-hub
With NPX
npx @resultadosdigitais/front-hub-cli
(npx comes with npm 5.2+ and higher)
Option | Description |
---|---|
-V, --version | Output the version number |
-h, --help | Display help for command |
init
This command is meant to be executed in a blank git repository, if you are migrating from a create react app
, please follow instructions from "Migrating my create react app to FrontHub".
In a blank git repository type
front-hub init [options] <project-directory>
Option | Description |
---|---|
-y, --yes | Runs with default config |
-h, --help | Display help for command |
For extra configurations use the front-hub.config.js.
create package
Creates a package in FrontHub project.
front-hub create package [options] <package-directory-name> [project-directory]
Option | Description |
---|---|
-y, --yes | Runs with default config |
-h, --help | Display help for command |
Example:
cd my-monorepo
front-hub create package my-microfrontend
This command will generate my-microfrontend
with all FrontHub configuration inside of packages directory:
my-monorepo/
packages/
my-microfrontend/
For extra configurations use the front-hub.config.js.
clear
Clear cache and temporary files of front-hub
.
front-hub clear
Option | Description |
---|---|
-h, --help | Display help for command |
fake
api
Creates a fake FrontHub api. To learn more about this feature, use the Fake API instructions
front-hub fake api [options]
Option | Description |
---|---|
-L, --noLerna | Run in repositories without lerna |
-p, --port | Specifies the port where the service is listening. (default: 5000) |
-h, --help | Display help for command |
repository
Creates a fake FrontHub repository. To learn more about this feature, use the Fake Repository instructions
front-hub fake repository [options]
Option | Description |
---|---|
-p, --port | Specifies the port where the service is listening. (default: 3001) |
-h, --help | Display help for command |