Reference

wf generate

Generate a new page, component, or store — or a block, a whole page to own: sign-in, pricing, dashboard, settings

wf generate KIND NAME [options]

Writes: a new source file.

Writes a starter page, component or store.

bash

$ wf generate page Pricing $ wf generate component PriceCard $ wf generate store Cart

A page gets a path from its name (/pricing), a title, a description and an h1. The file is .wfx when the project is written in that layout.

wf generate block NAME writes a whole page instead — sign-in (a form that checks what is typed), pricing (three plans, monthly or yearly), dashboard (figures, a trend and a table) or settings (a profile, notifications and the account, in tabs) — into src/pages/. It is ordinary source, the project's own to change; it builds with nothing to report. wf generate never overwrites a file: when one exists, it says so and writes nothing.

Options

Options of wf generate
OptionTypeMeaning

KIND

page | component | store | block

What to generate: page, component, store, or block

NAME

text

Name of the item to generate; for a block, which: sign-in, pricing, dashboard or settings

--dir

-d DIR

path

Project directory (default: current directory)

Every command