cmd

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Overview

Package cmd contains all the commands and subcommands for sveltin.

Index

Constants

View Source
const (
	// Blank represents the fontmatter-only template id used when generating the content file.
	Blank string = "blank"
	// Sample represents the sample-content template id used when generating the content file.
	Sample string = "sample"
)
View Source
const (
	StyleDefault string = "default"
	StyleNone    string = "none"
)

names for the available style options

View Source
const (
	Bootstrap   string = "bootstrap"
	Bulma       string = "bulma"
	Scss        string = "scss"
	TailwindCSS string = "tailwindcss"
	VanillaCSS  string = "vanillacss"
)

names for the available CSS Lib options

View Source
const (
	Defaults  string = "defaults"
	Externals string = "externals"
	Website   string = "website"
	Menu      string = "menu"
	DotEnv    string = "dotenv"
)

names for config files

View Source
const (
	Svelte   string = "svelte"
	Markdown string = "markdown"
)

Supported Pages languages

View Source
const (
	// SvelteKitStarter is a string representing the project starter id.
	SvelteKitStarter string = "starter"
	// ThemeStarter is a string representing the project starter id for new themes.
	ThemeStarter string = "blog-theme-starter"
)
View Source
const (
	RootFolder    string = "root"
	BackupsFolder string = "backups"
	ConfigFolder  string = "config"
	ContentFolder string = "content"
	RoutesFolder  string = "routes"
	ApiFolder     string = "api"
	ParamsFolder  string = "params"
	LibFolder     string = "lib"
	StaticFolder  string = "static"
	ThemesFolder  string = "themes"
)

Folder names for a Sveltin project structure.

View Source
const (
	ApiIndexFileId      string = "api_index"
	ApiMetadataIndexId  string = "api_metadata_index"
	ApiSlugFileId       string = "api_slug"
	IndexFileId         string = "index"
	IndexEndpointFileId string = "indexendpoint"
	SlugFileId          string = "slug"
	SlugEndpointFileId  string = "slugendpoint"
	SlugLayoutFileId    string = "sluglayout"
	MDsveXFileId        string = "mdsvex"
	DummyImgFileId      string = "dummy"
	SveltinDTSFileId    string = "sveltin_d_ts"
)

File IDs for a Sveltin project structure.

View Source
const (
	ProjectSettingsFile string = "sveltin.json"
	DefaultsConfigFile  string = "defaults.js.ts"
	DotEnvProdFile      string = ".env.production"
	WebSiteTSFile       string = "website.js.ts"
	MenuTSFile          string = "menu.js.ts"
	PackageJSONFile     string = "package.json"
	MDsveXFile          string = "mdsvex.config.js"
	SvelteConfigFile    string = "svelte.config.js"
	LayoutTSFile        string = "+layout.ts"
	HeadingsJSFile      string = "headings.js"
	StringsTSFile       string = "strings.js.ts"
	SveltinDTSFile      string = "sveltin.d.ts"
	ViteConfigFile      string = "vite.config.ts"
	TSConfigFile        string = "tsconfig.json"
)

File names for a Sveltin project structure.

View Source
const (
	StringMatcher  string = "string_matcher"
	GenericMatcher string = "generic_matcher"
)

Matchers IDs

View Source
const (
	// CliVersion is the current sveltin cli version number.
	CliVersion string = "0.11.0"
)

Variables

View Source
var (
	// YamlConfig is used by yaml.Unmarshal to decode the YAML file.
	YamlConfig []byte
)

Functions

func DeployCmdRun added in v0.4.0

func DeployCmdRun(cmd *cobra.Command, args []string)

DeployCmdRun is the actual work function.

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. It is called by main.main().

func GetSveltinCommands

func GetSveltinCommands() []*cobra.Command

GetSveltinCommands returns an array of pointers to the implemented cobra.Command

func InitCmdRun added in v0.9.0

func InitCmdRun(cmd *cobra.Command, args []string)

InitCmdRun is the actual work function.

func NewPageCmdRun

func NewPageCmdRun(cmd *cobra.Command, args []string)

NewPageCmdRun is the actual work function.

func NewThemeCmdRun added in v0.8.0

func NewThemeCmdRun(cmd *cobra.Command, args []string)

NewThemeCmdRun is the actual work function.

func RunAddContentCmd added in v0.9.0

func RunAddContentCmd(cmd *cobra.Command, args []string)

RunAddContentCmd is the actual work function.

func RunAddMetadataCmd added in v0.9.0

func RunAddMetadataCmd(cmd *cobra.Command, args []string)

RunAddMetadataCmd is the actual work function.

func RunBuildCmd

func RunBuildCmd(cmd *cobra.Command, args []string)

RunBuildCmd is the actual work function.

func RunCompletionCmd added in v0.11.0

func RunCompletionCmd(cmd *cobra.Command, args []string) error

RunCompletionCmd is the actual work function.

func RunGenerateMenuCmd

func RunGenerateMenuCmd(cmd *cobra.Command, args []string)

RunGenerateMenuCmd is the actual work function.

func RunGenerateRSSCmd

func RunGenerateRSSCmd(cmd *cobra.Command, args []string)

RunGenerateRSSCmd is the actual work function.

func RunGenerateSitemapCmd

func RunGenerateSitemapCmd(cmd *cobra.Command, args []string)

RunGenerateSitemapCmd is the actual work function.

func RunInstallCmd added in v0.5.0

func RunInstallCmd(cmd *cobra.Command, args []string)

RunInstallCmd is the actual work function.

func RunMigrateCmd added in v0.11.0

func RunMigrateCmd(cmd *cobra.Command, args []string)

RunMigrateCmd is the actual work function.

func RunNewResourceCmd

func RunNewResourceCmd(cmd *cobra.Command, args []string)

RunNewResourceCmd is the actual work function.

func RunPreviewCmd

func RunPreviewCmd(cmd *cobra.Command, args []string)

RunPreviewCmd is the actual work function.

func RunServerCmd

func RunServerCmd(cmd *cobra.Command, args []string)

RunServerCmd is the actual work function.

func RunUpdateCmd added in v0.3.0

func RunUpdateCmd(cmd *cobra.Command, args []string)

RunUpdateCmd is the actual work function.

Types

type EntryType added in v0.4.0

type EntryType int

EntryType describes the different types of an Entry

const (
	EntryTypeFolder EntryType = 0
	EntryTypeFile   EntryType = 1
)

The differents types of an Entry

Jump to

Keyboard shortcuts

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