cli

package
v0.0.0-...-82bc1ab Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Build = cmd.Sub{
	Name:  "build",
	Alias: "up",
	Short: "Generate the site",
	Flags: &BuildFlags{
		Src:   ".",
		Build: "build",
	},
	Run: BuildRun,
}

Build generates an updated static site tree

View Source
var Init = cmd.Sub{
	Name:  "init",
	Alias: "new",
	Short: "Create a new static-cling project",
	Flags: &InitFlags{
		DestDir: ".",
	},
	Run: InitRun,
}

Init populates a new blank project tree

View Source
var Root = cmd.Root{
	Name:  "static-cling",
	Short: "A no nonsense static static site generator",
}

Root command for "static-cling"

View Source
var Server = cmd.Sub{
	Name:  "server",
	Alias: "run",
	Short: "Start and HTTP server to serve out the files in the output directory",
	Run:   ServerRun,
}

Server runs a local web server to preview changes made to the website

Functions

func BuildRun

func BuildRun(r *cmd.Root, s *cmd.Sub)

BuildRun carries out the "build" sub-command

func InitRun

func InitRun(r *cmd.Root, s *cmd.Sub)

InitRun carries out the "init" sub-command

func ServerRun

func ServerRun(r *cmd.Root, s *cmd.Sub)

ServerRun carries out the "server" sub-command

Types

type BuildFlags

type BuildFlags struct {
	Src   string `short:"S" long:"source" desc:"source of project files (default '.')"`
	Build string `short:"B" long:"build"  desc:"name of the buid dir, relative to source (default 'build')"`
}

BuildFlags are flags used by the "build" sub-command

type InitFlags

type InitFlags struct {
	DestDir string `short:"D" long:"destdir" desc:"destination for new project (default is '.')"`
}

InitFlags are flags used by the "init" sub-command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL