Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
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:
- a flat tree represented by a map of the root page in component form
- 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