Documentation ¶
Overview ¶
Package config ...
Package config ...
Package config ...
Package config ...
Package config ...
Package config ...
Package config ...
Package config ...
Index ¶
- type API
- type AppTemplate
- type IConfig
- type Pages
- type Paths
- type ProjectConfig
- type StarterTemplate
- type SveltinConfig
- func (c *SveltinConfig) GetAPIFilename() string
- func (c *SveltinConfig) GetAPIPath() string
- func (c *SveltinConfig) GetAPIVersion() string
- func (c *SveltinConfig) GetBuildPath() string
- func (c *SveltinConfig) GetConfigPath() string
- func (c *SveltinConfig) GetContentPageFilename() string
- func (c *SveltinConfig) GetContentPath() string
- func (c *SveltinConfig) GetIndexEndpointFilename() string
- func (c *SveltinConfig) GetIndexPageFilename() string
- func (c *SveltinConfig) GetLibPath() string
- func (c *SveltinConfig) GetParamsPath() string
- func (c *SveltinConfig) GetProjectRoot() string
- func (c *SveltinConfig) GetRoutesPath() string
- func (c *SveltinConfig) GetSlugEndpointFilename() string
- func (c *SveltinConfig) GetSlugLayoutFilename() string
- func (c *SveltinConfig) GetSlugPageFilename() string
- func (c *SveltinConfig) GetSrcPath() string
- func (c *SveltinConfig) GetStaticPath() string
- func (c *SveltinConfig) GetThemeComponentsPath() string
- func (c *SveltinConfig) GetThemeConfigFilename() string
- func (c *SveltinConfig) GetThemePartialsPath() string
- func (c *SveltinConfig) GetThemesPath() string
- type TemplateData
- type TplConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct { Version string `mapstructure:"version"` Filename string `mapstructure:"filename"` }
API represents the API folder structure in a Sveltin project.
type AppTemplate ¶
AppTemplate is the stuct presenting the github repository used by sveltin to clone the starter project repos.
type IConfig ¶
type IConfig interface { GetProjectRoot() string GetBuildPath() string GetConfigPath() string GetContentPath() string GetStaticPath() string GetSrcPath() string GetAPIPath() string GetAPIVersion() string GetAPIFilename() string GetPublicAPIFilename() string GetLibPath() string GetRoutesPath() string GetThemesPath() string GetThemeConfigFilename() string GetThemeComponentsPath() string GetThemePartialsPath() string GetIndexPageFilename() string GetSlugPageFilename() string GetContentPageFilename() string }
IConfig is the interface defining the methods to be implemented.
type Pages ¶
type Pages struct { Content string `mapstructure:"content"` Index string `mapstructure:"index"` IndexEndpoint string `mapstructure:"indexendpoint"` Slug string `mapstructure:"slug"` SlugEndpoint string `mapstructure:"slugendpoint"` SlugLayout string `mapstructure:"sluglayout"` }
Pages is the struct representing a public page and its content for a sveltin project.
type Paths ¶
type Paths struct { Build string `mapstructure:"build"` Config string `mapstructure:"config"` Content string `mapstructure:"content"` Static string `mapstructure:"static"` Themes string `mapstructure:"themes"` Src string `mapstructure:"src"` Params string `mapstructure:"params"` Lib string `mapstructure:"lib"` Routes string `mapstructure:"routes"` API string `mapstructure:"api"` }
Paths is the struct mapping the folders structure for a sveltin project.
type ProjectConfig ¶ added in v0.4.0
type ProjectConfig struct { BaseURL string `mapstructure:"VITE_PUBLIC_BASE_PATH"` SitemapChangeFreq string `mapstructure:"sitemapChangeFreq"` SitemapPriority string `mapstructure:"sitemapPriority"` SvelteKitBuildFolder string `mapstructure:"SVELTEKIT_BUILD_FOLDER"` FTPHost string `mapstructure:"FTP_HOST"` FTPPort int `mapstructure:"FTP_PORT"` FTPUser string `mapstructure:"FTP_USER"` FTPPassword string `mapstructure:"FTP_PASSWORD"` FTPServerFolder string `mapstructure:"FTP_SERVER_FOLDER"` FTPDialTimeout int `mapstructure:"FTP_DIAL_TIMEOUT"` FTPEPSVMode bool `mapstructure:"FTP_EPSV"` }
ProjectConfig is the struct used to map the env.production file props.
type StarterTemplate ¶ added in v0.8.1
StarterTemplate is the stuct presenting the github repository used by sveltin to clone the starter project repos.
type SveltinConfig ¶
type SveltinConfig struct { Pages Pages `mapstructure:"pages"` Paths Paths `mapstructure:"paths"` API API `mapstructure:"api"` Theme tpltypes.Theme `mapstructure:"theme"` }
SveltinConfig is the struct used the map the YAML file.
func (*SveltinConfig) GetAPIFilename ¶
func (c *SveltinConfig) GetAPIFilename() string
GetAPIFilename returns a string representing the path to the 'src/routes/api/v1/<resource>/index.ts' folder relative to the current working directory.
func (*SveltinConfig) GetAPIPath ¶
func (c *SveltinConfig) GetAPIPath() string
GetAPIPath returns a string representing the path to the 'src/routes/api' folder relative to the current working directory.
func (*SveltinConfig) GetAPIVersion ¶
func (c *SveltinConfig) GetAPIVersion() string
GetAPIVersion returns a string representing the path to the 'src/routes/api/v1' folder relative to the current working directory.
func (*SveltinConfig) GetBuildPath ¶
func (c *SveltinConfig) GetBuildPath() string
GetBuildPath returns a string representing the path to the 'build' folder relative to the current working directory.
func (*SveltinConfig) GetConfigPath ¶
func (c *SveltinConfig) GetConfigPath() string
GetConfigPath returns a string representing the path to the 'config' folder relative to the current working directory.
func (*SveltinConfig) GetContentPageFilename ¶
func (c *SveltinConfig) GetContentPageFilename() string
GetContentPageFilename returns a string representing the path to the 'content' folder relative to the current working directory.
func (*SveltinConfig) GetContentPath ¶
func (c *SveltinConfig) GetContentPath() string
GetContentPath returns a string representing the path to the 'content' folder relative to the current working directory.
func (*SveltinConfig) GetIndexEndpointFilename ¶ added in v0.6.0
func (c *SveltinConfig) GetIndexEndpointFilename() string
GetIndexEndpointFilename returns '+page.svelte' file.
func (*SveltinConfig) GetIndexPageFilename ¶
func (c *SveltinConfig) GetIndexPageFilename() string
GetIndexPageFilename returns a string representing the path to the 'index' file relative to the current working directory.
func (*SveltinConfig) GetLibPath ¶
func (c *SveltinConfig) GetLibPath() string
GetLibPath returns a string representing the path to the 'src/lib' folder relative to the current working directory.
func (*SveltinConfig) GetParamsPath ¶ added in v0.8.9
func (c *SveltinConfig) GetParamsPath() string
GetParamsPath returns a string representing the path to the 'src/params' folder relative to the current working directory.
func (*SveltinConfig) GetProjectRoot ¶
func (c *SveltinConfig) GetProjectRoot() string
GetProjectRoot returns a string representing the current working directory.
func (*SveltinConfig) GetRoutesPath ¶
func (c *SveltinConfig) GetRoutesPath() string
GetRoutesPath returns a string representing the path to the 'src/routes' folder relative to the current working directory.
func (*SveltinConfig) GetSlugEndpointFilename ¶ added in v0.6.0
func (c *SveltinConfig) GetSlugEndpointFilename() string
GetSlugEndpointFilename returns '+page.ts' as filename for the slug.
func (*SveltinConfig) GetSlugLayoutFilename ¶ added in v0.10.0
func (c *SveltinConfig) GetSlugLayoutFilename() string
GetSlugLayoutFilename returns '+layout.svelte' as filename for the slug.
func (*SveltinConfig) GetSlugPageFilename ¶
func (c *SveltinConfig) GetSlugPageFilename() string
GetSlugPageFilename returns '+page.svelte' filename for the slug.
func (*SveltinConfig) GetSrcPath ¶
func (c *SveltinConfig) GetSrcPath() string
GetSrcPath returns a string representing the path to the 'src' folder relative to the current working directory.
func (*SveltinConfig) GetStaticPath ¶
func (c *SveltinConfig) GetStaticPath() string
GetStaticPath returns a string representing the path to the 'static' folder relative to the current working directory.
func (*SveltinConfig) GetThemeComponentsPath ¶
func (c *SveltinConfig) GetThemeComponentsPath() string
GetThemeComponentsPath returns a string representing the path to the 'themes/<theme>/components' folder relative to the current working directory.
func (*SveltinConfig) GetThemeConfigFilename ¶
func (c *SveltinConfig) GetThemeConfigFilename() string
GetThemeConfigFilename returns a string representing the path to the 'themes/theme.config.js' file relative to the current working directory.
func (*SveltinConfig) GetThemePartialsPath ¶
func (c *SveltinConfig) GetThemePartialsPath() string
GetThemePartialsPath returns a string representing the path to the 'themes/<theme>/partials' folder relative to the current working directory.
func (*SveltinConfig) GetThemesPath ¶
func (c *SveltinConfig) GetThemesPath() string
GetThemesPath returns a string representing the path to the 'themes' folder relative to the current working directory.
type TemplateData ¶
type TemplateData struct { ProjectName string Name string Config *SveltinConfig NPMClient *tpltypes.NPMClientData Vite *tpltypes.ViteData Page *tpltypes.PageData Resource *tpltypes.ResourceData Content *tpltypes.ContentData Metadata *tpltypes.MetadataData Menu *tpltypes.MenuData NoPage *tpltypes.NoPageData Theme *tpltypes.ThemeData Misc *tpltypes.MiscFileData }
TemplateData is the struct representing all the data to be passed to a template file.