Documentation
¶
Overview ¶
Package common ...
Package common ...
Package common ...
Package common ...
Index ¶
- func CheckMaxArgs(items []string, max int) error
- func CheckMinMaxArgs(items []string, min int, max int) error
- func Contains(s []string, str string) bool
- func CopyFileFromEmbeddedFS(efs *embed.FS, fs afero.Fs, pathToFile string, saveTo string) error
- func Difference(a, b []string) []string
- func DirExists(fs afero.Fs, path string) bool
- func FileExists(fs afero.Fs, path string) (bool, error)
- func MkDir(fs afero.Fs, x ...string) error
- func MoveFile(efs *embed.FS, fs afero.Fs, sourceFile string, saveTo string, backup bool) error
- func PrintHelperTextDeploySummary(numOfFolders, numOfFiles int)
- func PrintHelperTextDryRunFlag()
- func PrintHelperTextNewMetadata(metadataInfo *config.TemplateData)
- func PrintHelperTextNewResource(name string)
- func PrintNextStepsHelperForNewProject(uc *UserProjectConfig)
- func PrintNextStepsHelperForNewProjectWithExistingTheme(uc *UserProjectConfig)
- func ReadFileLineByLine(appFs afero.Fs, filepath string) ([]string, error)
- func ShowDeployCommandWarningMessages()
- func TouchFile(fs afero.Fs, x ...string) error
- func Union(a, b []string) []string
- func UnionMap(m1, m2 map[string]string) map[string]string
- func Unique(s []string) []string
- func WriteToDisk(fs afero.Fs, inpath string, r io.Reader) (err error)
- type UserProjectConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckMaxArgs ¶
CheckMaxArgs returns an error if there are more than N args.
func CheckMinMaxArgs ¶
CheckMinMaxArgs returns an error if the number of args is not within the expected range.
func CopyFileFromEmbeddedFS ¶
CopyFileFromEmbeddedFS copy files from the embedded file system to the actual file system.
func Difference ¶ added in v0.9.0
Difference returns the elements in `a` that aren't in `b`.
func FileExists ¶
FileExists returns true if the file exists.
func MoveFile ¶ added in v0.7.0
MoveFile copy files from the embedded file system to the actual file system and can backups them.
func PrintHelperTextDeploySummary ¶ added in v0.9.0
func PrintHelperTextDeploySummary(numOfFolders, numOfFiles int)
PrintHelperTextDeploySummary prints a summary message string for commands like deploy.
func PrintHelperTextDryRunFlag ¶ added in v0.9.0
func PrintHelperTextDryRunFlag()
PrintHelperTextDryRunFlag prints a message box for commands supporting the 'dry-run mode'.
func PrintHelperTextNewMetadata ¶ added in v0.9.0
func PrintHelperTextNewMetadata(metadataInfo *config.TemplateData)
PrintHelperTextNewMetadata prints an help message string for 'metadata creation'.
func PrintHelperTextNewResource ¶ added in v0.9.0
func PrintHelperTextNewResource(name string)
PrintHelperTextNewResource prints an help message string for 'resource creation'.
func PrintNextStepsHelperForNewProject ¶ added in v0.9.0
func PrintNextStepsHelperForNewProject(uc *UserProjectConfig)
PrintNextStepsHelperForNewProject prints an help message as next steps for a project creation.
func PrintNextStepsHelperForNewProjectWithExistingTheme ¶ added in v0.9.0
func PrintNextStepsHelperForNewProjectWithExistingTheme(uc *UserProjectConfig)
PrintNextStepsHelperForNewProjectWithExistingTheme pprints an help message as next steps for a project creation with an existing theme'.
func ReadFileLineByLine ¶ added in v0.5.2
ReadFileLineByLine returns a slice of strings representing lines of the input file.
func ShowDeployCommandWarningMessages ¶ added in v0.5.0
func ShowDeployCommandWarningMessages()
ShowDeployCommandWarningMessages display a set of useful information for the deploy over FTP process.
func Union ¶ added in v0.5.2
Union returns a slice containing the unique values of the input slices.
Types ¶
type UserProjectConfig ¶ added in v0.9.0
type UserProjectConfig struct { ProjectName string CSSLibName string ThemeName string NPMClientName string }
UserProjectConfig represents the user selections when creating a new sveltin project.
func (*UserProjectConfig) PrintHelperTextNewTheme ¶ added in v0.9.0
func (uc *UserProjectConfig) PrintHelperTextNewTheme()
PrintHelperTextNewTheme returns an help message string for 'theme creation'.