buildassets

package
v2.0.0-...-21d7e90 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLocalPath

func GetLocalPath(projectData *project.Project, file string) string

GetLocalPath returns the local path of the requested build asset file

func Install

func Install(targetDir string) error

Install will install all default project assets

func ReadFile

func ReadFile(projectData *project.Project, file string) ([]byte, error)

ReadFile reads the file from the project build folder. If the file does not exist it falls back to the embedded file and the file will be written to the disk for customisation.

func ReadFileWithProjectData

func ReadFileWithProjectData(projectData *project.Project, file string) ([]byte, error)

ReadFileWithProjectData reads the file from the project build folder and replaces ProjectInfo if necessary. If the file does not exist it falls back to the embedded file and the file will be written to the disk for customisation. The file written is the original unresolved one.

func ReadOriginalFileWithProjectDataAndSave

func ReadOriginalFileWithProjectDataAndSave(projectData *project.Project, file string) ([]byte, error)

ReadOriginalFileWithProjectDataAndSave reads the file from the embedded assets and replaces ProjectInfo if necessary. It will also write the resolved final file back to the project build folder.

Types

This section is empty.

Jump to

Keyboard shortcuts

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