internal

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2022 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrFileTooRecentlyProcessed = errors.New("change not accepted, file too recently processed")

Functions

func CachedEnvFromFile

func CachedEnvFromFile(path string) (srcpack.CachedEnvKeys, error)

CachedEnvFromFile creates a new cached environment provided a file path for this method, we prefer using a single pass file reader over something like reflection due to the speed constraints of reflection

func NewDevSession added in v0.3.2

func NewDevSession(ctx context.Context, opts *SessionOpts) (*devSession, error)

NewDevSession creates a new active dev session with the following:

  1. a flat tree represented by a map of the root page in component form
  2. initializes the development build process

func OrbitFileStructure

func OrbitFileStructure(s *FileStructureOpts) error

OrbitFileStructure creates the foundation for orbits file structure, this includes: 1. creating the out package directory 2. the ./.orbit file structure 3. asset directory

Types

type ChangeRequestOpts added in v0.3.2

type ChangeRequestOpts struct {
	SafeFileTimeout time.Duration
	HotReload       hotreload.HotReloader
	Hook            *srcpack.SyncHook
}

ChangeRequestOpts options used for processing a change request

type FileStructureOpts

type FileStructureOpts struct {
	PackageName string
	OutDir      string
	Assets      []fs.DirEntry
	Dist        []fs.DirEntry
}

FileStructureOpts reqired structure options for the file structure creation

type PackageJSONTemplate

type PackageJSONTemplate struct {
	Name         string            `json:"name"`
	Version      string            `json:"version"`
	Author       string            `json:"author"`
	License      string            `json:"license"`
	Description  string            `json:"description"`
	Dependencies map[string]string `json:"dependencies"`
}

PackageJSONTemplate struct for nodejs package.json file.

func (*PackageJSONTemplate) Write

func (p *PackageJSONTemplate) Write(path string) error

Write creates a new package.json to the provided path

type SessionOpts added in v0.3.0

type SessionOpts struct {
	WebDir        string
	Mode          string
	Pacname       string
	OutDir        string
	NodeModDir    string
	PublicDir     string
	HotReloadPort int
}

SessionOpts are options used for creating a new session

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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