npm install git+https://github.com/locomote-sh/pwa-build-tools.git
npx locomote <command> [options...] [args...]
<command>is a build command; see the Commands section below;
[options...]are runtime options; see the Options section below;
[args...]is one or more arguments to the build command.
A number of standard commands are available, these are:
serve [source] [target]: Build a project and serve it locally using the development server. The build source and target locations can be optionally specified as arguments; they default to
.(i.e. the current directory) and
_siterespectively. The development server will watch the source location and automatically rebuild the project after updates.
pwa-build [source]: Build PWA assets. This command will generate an assortment of different assets - app icon and splashscreen images, web manifest files etc. - from information in the content manifest and write them to the source location. The source location may be optionally specified as the command's argument; it defaults to
.(i.e. the current directory).
build [origin] [source] [target]: Build a project and write the result to the content repository. All arguments are optional. The
originargument is a file path or URL to the content repository, and defaults to
.(i.e. the current directory). The
targetarguments here specify the names of the content repository branches holding the project source and built content. They default to the values
testrespectively, meaning that the command will build the contents of the master branch and write the result to the test branch.
The following runtime switches and flags are available:
--help: Print the command help message and exit.
--version: Print the command version and exit.
--config <file>: Specify the name of a file containing additional tool configuration.
-E<name>=<value>: Specify additional build environment variables as
Generate a project's PWA assets from its root directory:
npx locomote pwa-build
Run the development server from the project's root directory:
npx locomote serve
Build the project from its root directory and publish the results on the test branch:
npx locomote build
git push --all
Build a remote project and publish the results directly to the public branch:
npx locomote build ssh://firstname.lastname@example.org:22222/account/project.git master public