CLI Commands¶
This is a list of the available CLI commands for Ginpar.
This page contains the same information you’d get if you run
ginpar --help
and then,
ginpar COMMAND --help
for every command available.
ginpar¶
Ginpar is a static content generator for interactive P5.js sketches, awkwardly named after Generative Interactive Parametrisable Canvases.
ginpar [OPTIONS] COMMAND [ARGS]...
Options
-
--version
¶
Show the version and exit.
Commands
-
build
Build the project content into PATH.
-
init
Initialize a new project in PATH.
-
new
Create a new SKETCH.
-
quickstart
Import a working sample project.
-
serve
Start a new server in localhost:PORT.
ginpar build¶
Build the project content into PATH.
ginpar build will read your configuration file, fetch all the sketches inside your <config.content_path>, and build your static site inside PATH, which defaults to <config.build_path>, or public if it doesn’t exist.
This operation will wipe all the content from PATH in each run, so you must not make modifications you expect to preserve.
ginpar build [OPTIONS]
Options
-
-p
,
--path
<path>
¶ The PATH where the site will be built. [ <config.build_path>, public ] This path is relative to the current directory. When no option is provided Ginpar will read the <config.build_path> from the configuration file.
ginpar init¶
Initialize a new project in PATH.
ginpar init will prompt you for a series of values that will be used to generate the configuration and file structure of your project.
ginpar init [OPTIONS]
Options
-
-f
,
--force
¶
If Ginpar finds an existing directory with the same name of the project being initialized, it’ll force its removal. Only do this if you’re completely sure you want to do it.
-
-q
,
--quick
¶
Skip the prompts and use the default values for the configuration file. You can still modify the variables later by manually updating your configuration file.
ginpar new¶
Create a new SKETCH.
ginpar new will create a new sketch structure inside your <config.content_path>.
You must specify the name of the sketch.
If there’s an existing sketch with the same name, it’ll throw an error and ask for a different name.
ginpar new [OPTIONS] SKETCH
Arguments
-
SKETCH
¶
Required argument
ginpar quickstart¶
Import a working sample project.
ginpar quickstart will download the contents of the sample project, hosted at github: davidomarf/ginpar-quickstart in the current directory.
ginpar quickstart [OPTIONS]
Options
-
-f
,
--force
¶
If Ginpar finds an existing directory with the same name of the sample content, it’ll force its removal. Only do this if you’re completely sure you want to do it.
ginpar serve¶
Start a new server in localhost:PORT.
ginpar serve will trigger ginpar build, and start a new server inside <config.build_path>.
Every time you modify a file that is part of the project’s source code the site gets built again.
ginpar serve [OPTIONS]
Options
-
-p
,
--port
<port>
¶ Port of the server
-
-w
,
--watch
¶
By default, the server will only watch for changes in the source path, but if this flag is received, it’ll watch all the project directories.