const basys = require('basys');Initializes a new Basys project from a starter template and installs npm packages.
options is an object with the following attributes:
name- starter template name, that 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.
- Public GitHub repository in a form
dest- the directory path where project will be generated (must be empty or non-existent).vscode- boolean indicating whether Visual Studio Code workspace settings should be generated.
If some of these options are missing the interactive CLI will be launched in the terminal.
install is a boolean that indicates whether npm packages should be installed.
Returns a promise that is resolved once project initialization is complete.
This command starts the development server, that automatically bundles all your code and opens web app in the browser with hot module reload. By default the server starts at localhost:8080 (can be customized in basys.json configuration file using host and port options). If the port is occupied it will search for the nearest empty port.
projectDir is a Basys project directory, appName is an app name defined in basys.json (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 appBuilder = false.
Returns a promise fulfilled with the app configuration object.
Generates a production bundle of the app into <project-dir>/build/<app-name> directory. Returns a promise fulfilled with the app configuration object.
Starts a local server to test a previously generated production bundle. Returns the app configuration object.
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.
options is an optional TestCafe test runner configuration object.
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.
If fix = true some linting errors can be automatically fixed (overwriting the original source files).