Documentation ¶
Overview ¶
Package cmd contains all the commands and subcommands for sveltin.
Index ¶
- Constants
- Variables
- func DeployCmdRun(cmd *cobra.Command, args []string)
- func Execute()
- func GetSveltinCommands() []*cobra.Command
- func InitCmdRun(cmd *cobra.Command, args []string)
- func NewPageCmdRun(cmd *cobra.Command, args []string)
- func NewThemeCmdRun(cmd *cobra.Command, args []string)
- func RunAddContentCmd(cmd *cobra.Command, args []string)
- func RunAddMetadataCmd(cmd *cobra.Command, args []string)
- func RunBuildCmd(cmd *cobra.Command, args []string)
- func RunCompletionCmd(cmd *cobra.Command, args []string) error
- func RunGenerateMenuCmd(cmd *cobra.Command, args []string)
- func RunGenerateRSSCmd(cmd *cobra.Command, args []string)
- func RunGenerateSitemapCmd(cmd *cobra.Command, args []string)
- func RunInstallCmd(cmd *cobra.Command, args []string)
- func RunMigrateCmd(cmd *cobra.Command, args []string)
- func RunNewResourceCmd(cmd *cobra.Command, args []string)
- func RunPreviewCmd(cmd *cobra.Command, args []string)
- func RunServerCmd(cmd *cobra.Command, args []string)
- func RunUpdateCmd(cmd *cobra.Command, args []string)
- type EntryType
Constants ¶
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" )
const ( StyleDefault string = "default" StyleNone string = "none" )
names for the available style options
const ( Bootstrap string = "bootstrap" Bulma string = "bulma" Scss string = "scss" TailwindCSS string = "tailwindcss" VanillaCSS string = "vanillacss" )
names for the available CSS Lib options
const ( Defaults string = "defaults" Externals string = "externals" Website string = "website" Menu string = "menu" DotEnv string = "dotenv" )
names for config files
const ( Svelte string = "svelte" Markdown string = "markdown" )
Supported Pages languages
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" )
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.
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.
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.
const ( StringMatcher string = "string_matcher" GenericMatcher string = "generic_matcher" )
Matchers IDs
const ( // CliVersion is the current sveltin cli version number. CliVersion string = "0.11.0" )
Variables ¶
var ( // YamlConfig is used by yaml.Unmarshal to decode the YAML file. YamlConfig []byte )
Functions ¶
func DeployCmdRun ¶ added in v0.4.0
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 ¶
GetSveltinCommands returns an array of pointers to the implemented cobra.Command
func InitCmdRun ¶ added in v0.9.0
InitCmdRun is the actual work function.
func NewPageCmdRun ¶
NewPageCmdRun is the actual work function.
func NewThemeCmdRun ¶ added in v0.8.0
NewThemeCmdRun is the actual work function.
func RunAddContentCmd ¶ added in v0.9.0
RunAddContentCmd is the actual work function.
func RunAddMetadataCmd ¶ added in v0.9.0
RunAddMetadataCmd is the actual work function.
func RunBuildCmd ¶
RunBuildCmd is the actual work function.
func RunCompletionCmd ¶ added in v0.11.0
RunCompletionCmd is the actual work function.
func RunGenerateMenuCmd ¶
RunGenerateMenuCmd is the actual work function.
func RunGenerateRSSCmd ¶
RunGenerateRSSCmd is the actual work function.
func RunGenerateSitemapCmd ¶
RunGenerateSitemapCmd is the actual work function.
func RunInstallCmd ¶ added in v0.5.0
RunInstallCmd is the actual work function.
func RunMigrateCmd ¶ added in v0.11.0
RunMigrateCmd is the actual work function.
func RunNewResourceCmd ¶
RunNewResourceCmd is the actual work function.
func RunPreviewCmd ¶
RunPreviewCmd is the actual work function.
func RunServerCmd ¶
RunServerCmd is the actual work function.
func RunUpdateCmd ¶ added in v0.3.0
RunUpdateCmd is the actual work function.