css

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: 9 Imported by: 0

Documentation

Overview

Package css implements the Template Method design pattern to allow the project setup based on the selected CSSLib.

Index

Constants

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

CSS lib names

View Source
const (
	PackageJSONFileId    string = "package_json"
	AppHTMLFileId        string = "app_html"
	ResetCSSFileId       string = "reset_css"
	AppCSSFileId         string = "app_css"
	VariablesFileId      string = "variables_scss"
	LayoutFileId         string = "layout"
	MDLayoutFileId       string = "md_layout"
	LayoutTSFileId       string = "layout_ts"
	ErrorFileId          string = "error"
	SvelteConfigFileId   string = "svelte_config"
	MDsveXFileId         string = "mdsvex_config"
	ViteConfigFileId     string = "vite_config"
	CTAFileId            string = "cta"
	FooterFileId         string = "footer"
	TailwindConfigFileId string = "tailwind_css_config"
	PostCSSFileId        string = "postcss"
)

template file ids

Variables

AvailableCSSLib is the list of the available css libs.

Functions

This section is empty.

Types

type CSSLib

type CSSLib struct {
	Name     string
	EFS      *embed.FS
	FS       afero.Fs
	Settings *config.SveltinSettings
	TplData  *config.TemplateData
}

CSSLib identifies the CSS lib to be used.

func NewBootstrap

func NewBootstrap(efs *embed.FS, fs afero.Fs, settings *config.SveltinSettings, tplData *config.TemplateData) *CSSLib

NewBootstrap returns a pointer to a CSSLib struct for Bootstrap.

func NewBulma

func NewBulma(efs *embed.FS, fs afero.Fs, settings *config.SveltinSettings, tplData *config.TemplateData) *CSSLib

NewBulma returns a pointer to a CSSLib struct for Bulma.

func NewScss

func NewScss(efs *embed.FS, fs afero.Fs, settings *config.SveltinSettings, tplData *config.TemplateData) *CSSLib

NewScss returns a pointer to a CSSLib struct for Scss.

func NewTailwindCSS

func NewTailwindCSS(efs *embed.FS, fs afero.Fs, settings *config.SveltinSettings, tplData *config.TemplateData) *CSSLib

NewTailwindCSS returns a pointer to a CSSLib struct for TailwindCSS.

func NewVanillaCSS

func NewVanillaCSS(efs *embed.FS, fs afero.Fs, settings *config.SveltinSettings, tplData *config.TemplateData) *CSSLib

NewVanillaCSS returns a pointer to a CSSLib struct for VanillaCSS.

func (*CSSLib) Setup

func (cssLib *CSSLib) Setup(isNewProject bool) error

Setup is responsible to create the files to setup the CSS Lib.

Jump to

Keyboard shortcuts

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