util

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatPackageName

func FormatPackageName(name string) string

func SavePackage

func SavePackage(folderPath string, pkg *Package) (bool, error)

SavePackage takes a Package and saves it to the %folderPath%/package.json

Types

type Package

type Package struct {

	// basics
	Name        string `json:"name"`
	Version     string `json:"version"`
	Description string `json:"description,omitempty"`
	Module      bool   `json:"module,omitempty"`

	// script files
	Preload  string `json:"preload,omitempty"`
	Postload string `json:"postload,omitempty"`
	Prestart string `json:"prestart,omitempty"`
	Plugin   string `json:"plugin,omitempty"`

	// dependencies
	ModDep map[string]string `json:"ccmodDependencies,omitempty"`
	Dep    map[string]string `json:"dependencies,omitempty"`
}

Package represents a CrossCode Mod package.json file

func GetPackage

func GetPackage(filePath string) (*Package, error)

GetPackage takes a filePath and returns a Package or erro

func InitPackage

func InitPackage() *Package

InitPackage creates an empty Package

Jump to

Keyboard shortcuts

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