internal

package
v1.1.0-beta.3 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Version         = "v1.1.0-beta.2"
	UrlUpdate       = "https://apps.promuevete.mx/catrina/version.php"
	EndExport       = "//@stop"
	Start           = "new"
	RunServer       = "run"
	Build           = "build"
	Update          = "update"
	UpdateTool      = "upgrade"
	VersionTool     = "version"
	ConfigFile      = "catrina.config.json"
	DefaultPort     = ":9095"
	CompileFileJs   = "catrina.js"
	CatrinaCoreJs   = "./lib/core/core.js"
	ExportsFilePath = "./lib/exports.js"
	FontsRelation   = "./lib/css-fonts-relation.json"
)

Variables

This section is empty.

Functions

func BuildProject

func BuildProject(config Config) error

BuildProject packages the project as defined in the configuration file.

func StartServer

func StartServer(config Config)

StartServer run a proof server as defined in the configuration file.

func UpdateCatrina

func UpdateCatrina(version, url string) error

UpdateCatrina check the latest version available for catrina and update the files if is necessary.

func UpdateStandardLib

func UpdateStandardLib() error

UpdateStandardLib update the standard library files in a project. This action delete the additional installed libraries.

Types

type Config

type Config struct {
	MainJS    string `json:"inputFileJS"`  // input file javascript location.
	MainCSS   string `json:"inputFileCSS"` // input file css location.
	BuildPath string `json:"deployPath"`   // path where final files will build and where start the proof server.
	BuildJS   string `json:"finalFileJS"`  // final javascript filename.
	BuildCSS  string `json:"finalFileCSS"` // final css filename.
	Port      string `json:"serverPort"`   // port of proof server.
}

Config is the catrina's project configuration

func NewProject

func NewProject(name string) (projectPath string, config Config, err error)

NewProject create a new project with catrina rules.

func ReadConfig

func ReadConfig() (config Config, err error)

ReadConfig read the configuration file

func (*Config) Set

func (config *Config) Set(file *os.File) error

Write the config file

type Import

type Import struct {
	// contains filtered or unexported fields
}

Import represents the relation between exported functions javascript and the file location where this functions has been written

type RelationCSSFont

type RelationCSSFont struct {
	Name string `json:"name"`
	Path string `json:"path"`
}

RelationCSSFont represents the relationship between css files and font files

type UpdateResponse

type UpdateResponse struct {
	Update   bool   `json:"update"`
	Version  string `json:"version"`
	Url      string `json:"url"`
	Checksum string `json:"checksum"`
	Error    bool   `json:"error"`
	Msj      string `json:"msj"`
}

Jump to

Keyboard shortcuts

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