CLI Usage
The CLI tool is used primarily to compile Paperclip files into your target framework.
#
Installationnpm install paperclip-cli --save-dev
#
Commands#
paperclip initInitializes Paperclip for a new or existing project. If you're starting a new project, the init
command will all a few questions, then generate project files for you.
#
paperclip buildGenerates code based on your paperclip config.
Options
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*.pc
files, so be sure to add*.pc.*
to your.gitignore
.watch
- Starts the file watcher & rebuilds UIs whenever they change.definition
- Generate a typed definition file (Specific to TypeScript)
Examples
If you're using Webpack, then you probably don't need to run paperclip build --write
since the paperclip loader handles that for you.
If you're using TypeScript, then you'll probably want to use the paperclip build --write --definition --watch
to generate typed definition files.