Worked on build command section.
This commit is contained in:
parent
8fd08f51f1
commit
3d74a79088
@ -8,13 +8,13 @@ v0.2.0
|
||||
|
||||
== Overview
|
||||
|
||||
`ssg` has two currently functioning sub-commands, `init` and `build`, one of which must be chosen at the command line.
|
||||
`ssg` has two sub-commands, `init` and `build`, one of which must be chosen when running from the command line.
|
||||
|
||||
NOTE: Previous versions of `ssg` contained a `watch` command; this will be re-introduced in future versions in a more abstracted way that will handle not only the file system changes but also database/external events as well.
|
||||
NOTE: Previous versions of `ssg` contained a `watch` sub-command; this will be re-introduced in future versions in a more abstracted way that will handle not only the file system changes but also database/external events as well.
|
||||
|
||||
=== Sub-command: `init`
|
||||
|
||||
`init` is a simple command which simply creates the expected file and folder structure for `ssg` in the current directory. The resulting directories and file (only `ssgBuilds.groovy`) are empty.
|
||||
`init` is a simple command which creates the expected file and folder structure for `ssg` in the current directory. The resulting directories and file (only `ssgBuilds.groovy`) are empty.
|
||||
|
||||
.resulting project structure after running `init`
|
||||
[plantuml, width=25%, format=svg]
|
||||
@ -58,6 +58,27 @@ However, with the `--skeleton` option (short form `-s`), a simple text, page, te
|
||||
|
||||
=== Sub-command: `build`
|
||||
|
||||
`build` encompasses the primary functionality of `ssg`. It accepts two options:
|
||||
|
||||
* `-b | --build`: The name of the build to execute. This option can be specified multiple times to specify multiple builds. The default is only one build, the `default` build; if any builds are specified, `default` is ignored (unless it is specified by the user, of course).
|
||||
* `-s | --script | --buildScript`: The path to the build script file to execute. This may only be specified once. The default is `ssgBuilds.groovy`.
|
||||
|
||||
.Examples of using `build`.
|
||||
[source,shell]
|
||||
----
|
||||
ssg build # <1>
|
||||
ssg build -b production # <2>
|
||||
ssg build -b production -b preview # <3>
|
||||
ssg build -s buildScript.groovy -b myBuild # <4>
|
||||
----
|
||||
<1> Builds the `default` build using the build script `ssgBuilds.groovy`.
|
||||
<2> Builds the `production` build using the build script `ssgBuilds.groovy`.
|
||||
<3> Builds both the `production` and `preview` builds using the build script `ssgBuilds.groovy`.
|
||||
<4> Builds the build named `myBuild` using the build script named `buildScript.groovy`.
|
||||
|
||||
== The `default` Build
|
||||
|
||||
If `init` is used to generate the project structure (or the structure is created manually by the user), the project structure matches the expected layout for the `default` build which is automatically included in all available builds. With no further specification, it will generate HTML pages from the given Texts, Pages, Templates, and Parts into the `build` directory.
|
||||
|
||||
== Program Execution
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user