Package
OS.js Package Abstraction
Constructor Summary
Public Constructor | ||
public |
constructor(core: Core, options: PackageOptions) Create new instance |
Member Summary
Public Members | ||
public |
|
|
public |
|
|
public |
|
Method Summary
Public Methods | ||
public |
Run method on package script |
|
public |
async destroy() Destroys instance |
|
public |
Initializes this package |
|
public |
Resolve an URL for resource |
|
public |
Starts server scripts |
|
public |
validate(manifest: PackageMetadata[]): boolean Validates this package |
|
public |
Creates a watch in package dist |
Public Constructors
public constructor(core: Core, options: PackageOptions) source
Create new instance
Params:
Name | Type | Attribute | Description |
core | Core | Core reference |
|
options | PackageOptions |
|
Instance options |
Public Members
public metadata: PackageMetadata source
Public Methods
public action(method: string): boolean source
Run method on package script
Params:
Name | Type | Attribute | Description |
method | string | Method name |
|
...args | * |
|
Pass arguments |
public resource(path: string): string source
Resolve an URL for resource
Params:
Name | Type | Attribute | Description |
path | string | Input path |
public validate(manifest: PackageMetadata[]): boolean source
Validates this package
Params:
Name | Type | Attribute | Description |
manifest | PackageMetadata[] | Global manifest |