OCLIF Plugin Incremental Renderer
oclif plugin for renderig pages using Gatsby v4.
How it works
This plugin has two commads. Use webops paths
for generating a staticPaths.json file containing the list of paths based on your faststore config. Feed this staticPaths.json
or your own file into webops render
to generate html's and json's for each path.
Usage
$ npm install -g @vtex/cli-plugin-incremental-renderer
$ vtex COMMAND
running command...
$ vtex (-v|--version|version)
@vtex/cli-plugin-incremental-renderer/0.0.4 linux-x64 node-v12.22.7
$ vtex --help [COMMAND]
USAGE
$ vtex COMMAND
...
$ cd /path/to/your/base.store/store
$ yarn clean && yarn build
$ yarn global add @vtex/cli-plugin-incremental-renderer
$ webops paths -o ./staticPaths.json
$ webops render -s ./staticPaths.json -o ./public
Commands
vtex paths [FILE]
generates a list of paths for a Faststore store
USAGE
$ vtex paths [FILE]
OPTIONS
-a, --account=account VTEX Account
-c, --channel=channel VTEX Channel
-c, --platform=platform ecommerce platform
-h, --help show CLI help
-o, --output=output staticPaths file
-v, --verbose=verbose
EXAMPLE
$ webops paths -o ./staticPaths.json -a fashioneurope
See code: build/commands/paths.ts
vtex render [FILE]
Renders html and json for a list of paths
USAGE
$ vtex render [FILE]
OPTIONS
-c, --concurrency=concurrency rendering concurrency
-h, --help show CLI help
-o, --output=output build artifacts output folder
-s, --static=static static paths config file
-v, --verbose=verbose
EXAMPLE
$ webops render -s ./staticPaths.json -o ./public
See code: build/commands/render.ts