Reference: CLI Commands
Full list of Workflow Commands
When inside of the current working directory of your application, you can run any of the below commands by running:
yarn <command-name>
help
Show help menu for all CLI options.
> yarn run help
Usage: av <command> [options]
Commands:
av init <projectName> [options] Initialize your project from scratch.
av release Bundle project for distribution (production
or staging) and create a git tag
av start Start the development server
av lint Lint source files using ESLint
av test Run your tests
av profile Analyze Webpack bundles and find what is
contributing their sizes
av build Bundle project for distribution (production
or staging)
av about About @availity/workflow
Options:
--help, -h Show help [boolean]
--version, -v Show version number [boolean]
Examples:
av init my-app-name
av start
av lint
View documentation at https://github.com/availity/workflow
init
Initializes a new project. Typically this is used in unison with npx
for kickstarting a new project. See the Quick Start guide more information about creating a new project.
Options
--version
,-v
: Specify which version of the project you want. [default: "latest"]--current-dir
,-c
: If you want the project to be created in the current directory--template
,-t
: The template you want to initialize the project with
Availity Templates
npx @availity/workflow init my-package-name --template https://github.com/Availity/availity-starter-typescript
start
Start the development server and watches for file changes. Hot-reloading can be toggled via workflow settings.
yarn start
options
--dry-run
: Start the development server using production settings.
lint
Lint project files using EsLint.
options
--include
: Include additional glob patterns for linting.--ignore-git-untracked
: Ignore files that are not indexed by git.--disable-linter
: Disable linter when creating bundles for production or staging.
build
- Cleans up
/dist
folder - Bundles project assets into the
/dist
folder
release
- Prompts the user for a version
- Cleans up
/dist
folder - Bundles project assets into the
/dist
folder - Tags the version in Git
There are different forms of releases, production
and staging
.
Production will minify the javascript assets and staging will not.
yarn production
options
--dry-run
- Disables committing files to git
- Disables creating a git tag
Skipped tasks will print a message in the console
ℹ [ Dry Run ] Skipping version bump
profile
Analyze Webpack bundles and find what is contributing their sizes. This command generates an html graphical chart that automatically opens in the browser as well as a text summary report in the console.
test
Run the tests for your project. (Jest)
options
--coverage
Indicates that test coverage information should be collected and reported in the output. You can leverage the --coverage
option from Jest.
> yarn test --coverage
› Started testing
Chrome 59.0.3071 (Mac OS X 10.12.5): Executed 3 of 3 SUCCESS (0.706 secs / 0.082 secs)
=============================== Coverage summary ===============================
Statements : 27.69% ( 8620/31134 )
Branches : 9.81% ( 1980/20189 )
Functions : 22.15% ( 1381/6235 )
Lines : 27.23% ( 7955/29217 )
================================================================================
✔ Finished testing
upgrade
Upgrades the workflow dependencies to the latest version and in some cases will attempt to fix the breaking chnages.
npx @availity/workflow-upgrade