The CLI tool is used primarily to compile Paperclip files into your target framework.
yarn add @paperclip-ui/cli --dev
Configures Paperclip with your current project & installs compilers.
Generates code based on your paperclip config.
write- Option to write compiled UI files to disk. Output is otherwise printed in the console log. Currently, files are written to the same directory as the
*.pcfiles, so be sure to add
watch- Starts the file watcher & rebuilds UIs whenever they change.
definition- Generate a typed definition file (Specific to TypeScript)
# Build all Paperclip files and print to stdout
yarn paperclip build --print
# Build Paperclip files & writes them
yarn paperclip build
# Starts watcher & writes them whenever they change
yarn paperclip build --watch
Start the visual tooling.
Generage a coverage report about HTML & CSS that is covered for visual regressions.
--html- generate HTML report
--open- open the HTML report after generating
--output- directory where to generate coverage report. Default is
# Generate coverage report and open
paperclip coverage --html --open
# Generate coverage report and output to ./civ
paperclip coverage --html --output=cov
Generates a base snapshot of the current branch for visual regression testing. Snapshots are saved to
--force- force snapshot if there are unstaged changes.
paperclip diff [branch]
Generates a report of visual changes against a different version of your application.
--open- open HTML report when emitted.
--html- emit HTML report
--watch- run differ in watch mode, re-run when files change.
# diff against master, generate HTML report, and re-run when the current branch changes
paperclip diff master --html --watch --open
# diff changes against snapshot of this brnach
paperclip diff --html --watch --open