Basys CLI can be installed globally using npm
npm install -g basys-clior Yarn:
yarn global add basys-cliThe following commands are available:
Initializes a new Basys project from a starter template and installs npm packages.
If starter template argument is not provided it will be requested interactively. Starter template argument supports two formats:
- Public GitHub repository in a form
<username>/<repo-name>(with an optional#branch); - Local directory provided by an absolute or relative path.
This commands starts the development server (at http://localhost:8080 by default if the port is not occupied), that automatically bundles all your code and opens web app in the browser with hot module reload. The app-name argument is required if project consists of several apps.
By default the development server launches Basys visual app builder (at localhost:8090 or the nearest empty port). To disable it pass -b argument.
Generates a production bundle of the app into <project-dir>/build/<app-name> directory.
Starts a local server to test a previously generated production bundle.
Runs project unit tests. Jest test files are automatically detected inside <project-dir>/tests/unit/ directory.
Builds the production app bundle and launches end-to-end tests for it. TestCafe test files are automatically detected inside <project-dir>/tests/e2e/ directory.
Lints the source code of the project and prints the list of linting errors. The default ESLint config created specifically for Basys projects can be found here. You can customize the rules in <project-dir>/.eslintrc file.
Performs code linting and automatically fixes linting errors when possible (overwriting the original source files).