node
No long description provided.
Installation
dagger install github.com/TomChv/daggerverse/node@4f06ebb5f74d9325b8be683fd1e0e6ba7f496cbb
Entrypoint
Return Type
Node
Example
dagger -m github.com/TomChv/daggerverse/node@4f06ebb5f74d9325b8be683fd1e0e6ba7f496cbb call \
func (m *myModule) example() *Node {
return dag.
Node()
}
@function
def example() -> dag.Node:
return (
dag.node()
)
@func()
example(): Node {
return dag
.node()
}
Types
Node 🔗
ctr() 🔗
Return Type
Container !
Example
dagger -m github.com/TomChv/daggerverse/node@4f06ebb5f74d9325b8be683fd1e0e6ba7f496cbb call \
ctr
func (m *myModule) example() *Container {
return dag.
Node().
Ctr()
}
@function
def example() -> dagger.Container:
return (
dag.node()
.ctr()
)
@func()
example(): Container {
return dag
.node()
.ctr()
}
withYarn() 🔗
WithYarn returns Node container with yarn configured as package manager.
Return Type
Node !
Example
dagger -m github.com/TomChv/daggerverse/node@4f06ebb5f74d9325b8be683fd1e0e6ba7f496cbb call \
with-yarn
func (m *myModule) example() *Node {
return dag.
Node().
WithYarn()
}
@function
def example() -> dag.Node:
return (
dag.node()
.with_yarn()
)
@func()
example(): Node {
return dag
.node()
.withYarn()
}
withVersion() 🔗
WithVersion returns Node container with given image version.
Return Type
Node !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
version | String ! | - | No description provided |
Example
dagger -m github.com/TomChv/daggerverse/node@4f06ebb5f74d9325b8be683fd1e0e6ba7f496cbb call \
with-version --version string
func (m *myModule) example(version string) *Node {
return dag.
Node().
WithVersion(version)
}
@function
def example(version: str) -> dag.Node:
return (
dag.node()
.with_version(version)
)
@func()
example(version: string): Node {
return dag
.node()
.withVersion(version)
}
withContainer() 🔗
WithContainer returns Node container with the given container.
Return Type
Node !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
ctr | Container ! | - | No description provided |
Example
dagger -m github.com/TomChv/daggerverse/node@4f06ebb5f74d9325b8be683fd1e0e6ba7f496cbb call \
with-container --ctr IMAGE:TAG
func (m *myModule) example(ctr *Container) *Node {
return dag.
Node().
WithContainer(ctr)
}
@function
def example(ctr: dagger.Container) -> dag.Node:
return (
dag.node()
.with_container(ctr)
)
@func()
example(ctr: Container): Node {
return dag
.node()
.withContainer(ctr)
}
container() 🔗
Container returns Node container.
Return Type
Container !
Example
dagger -m github.com/TomChv/daggerverse/node@4f06ebb5f74d9325b8be683fd1e0e6ba7f496cbb call \
container
func (m *myModule) example() *Container {
return dag.
Node().
Container()
}
@function
def example() -> dagger.Container:
return (
dag.node()
.container()
)
@func()
example(): Container {
return dag
.node()
.container()
}
withSource() 🔗
WithSource returns the Node container with source and cache set in it.
Return Type
Node !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | No description provided |
Example
dagger -m github.com/TomChv/daggerverse/node@4f06ebb5f74d9325b8be683fd1e0e6ba7f496cbb call \
with-source --source DIR_PATH
func (m *myModule) example(source *Directory) *Node {
return dag.
Node().
WithSource(source)
}
@function
def example(source: dagger.Directory) -> dag.Node:
return (
dag.node()
.with_source(source)
)
@func()
example(source: Directory): Node {
return dag
.node()
.withSource(source)
}
withNpm() 🔗
WithNpm returns Node container with npm configured as package manager.
Return Type
Node !
Example
dagger -m github.com/TomChv/daggerverse/node@4f06ebb5f74d9325b8be683fd1e0e6ba7f496cbb call \
with-npm
func (m *myModule) example() *Node {
return dag.
Node().
WithNpm()
}
@function
def example() -> dag.Node:
return (
dag.node()
.with_npm()
)
@func()
example(): Node {
return dag
.node()
.withNpm()
}
run() 🔗
Run returns the container with the command set.
Return Type
Container !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
args | [String ! ] ! | - | No description provided |
Example
dagger -m github.com/TomChv/daggerverse/node@4f06ebb5f74d9325b8be683fd1e0e6ba7f496cbb call \
run --args string1 --args string2
func (m *myModule) example(args []string) *Container {
return dag.
Node().
Run(args)
}
@function
def example(args: List[str]) -> dagger.Container:
return (
dag.node()
.run(args)
)
@func()
example(args: string[]): Container {
return dag
.node()
.run(args)
}
start() 🔗
Start returns the output of the code executed.
Return Type
String !
Example
dagger -m github.com/TomChv/daggerverse/node@4f06ebb5f74d9325b8be683fd1e0e6ba7f496cbb call \
start
func (m *myModule) example(ctx context.Context) string {
return dag.
Node().
Start(ctx)
}
@function
async def example() -> str:
return await (
dag.node()
.start()
)
@func()
async example(): Promise<string> {
return dag
.node()
.start()
}
lint() 🔗
Lint returns the output of the lint command.
Return Type
String !
Example
dagger -m github.com/TomChv/daggerverse/node@4f06ebb5f74d9325b8be683fd1e0e6ba7f496cbb call \
lint
func (m *myModule) example(ctx context.Context) string {
return dag.
Node().
Lint(ctx)
}
@function
async def example() -> str:
return await (
dag.node()
.lint()
)
@func()
async example(): Promise<string> {
return dag
.node()
.lint()
}
test() 🔗
Test returns the result of the test executed.
Return Type
String !
Example
dagger -m github.com/TomChv/daggerverse/node@4f06ebb5f74d9325b8be683fd1e0e6ba7f496cbb call \
test
func (m *myModule) example(ctx context.Context) string {
return dag.
Node().
Test(ctx)
}
@function
async def example() -> str:
return await (
dag.node()
.test()
)
@func()
async example(): Promise<string> {
return dag
.node()
.test()
}
build() 🔗
Build returns the Container with the source built.
Return Type
Node !
Example
dagger -m github.com/TomChv/daggerverse/node@4f06ebb5f74d9325b8be683fd1e0e6ba7f496cbb call \
build
func (m *myModule) example() *Node {
return dag.
Node().
Build()
}
@function
def example() -> dag.Node:
return (
dag.node()
.build()
)
@func()
example(): Node {
return dag
.node()
.build()
}
publish() 🔗
Publish publishes the source code to npm registry.
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
opts | PublishOpts ! | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'
func (m *myModule) example(ctx context.Context, opts *NodePublishOpts) string {
return dag.
Node().
Publish(ctx, opts)
}
@function
async def example(opts: dag.NodePublishOpts) -> str:
return await (
dag.node()
.publish(opts)
)
@func()
async example(opts: NodePublishOpts): Promise<string> {
return dag
.node()
.publish(opts)
}
install() 🔗
Install adds given package.
Return Type
Node !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
opts | InstallOpts ! | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'
func (m *myModule) example(opts *NodeInstallOpts) *Node {
return dag.
Node().
Install(opts)
}
@function
def example(opts: dag.NodeInstallOpts) -> dag.Node:
return (
dag.node()
.install(opts)
)
@func()
example(opts: NodeInstallOpts): Node {
return dag
.node()
.install(opts)
}
PublishOpts 🔗
token() 🔗
Return Type
Secret !
Example
Function NodePublishOpts.token is not accessible from the node module
Function NodePublishOpts.token is not accessible from the node module
Function NodePublishOpts.token is not accessible from the node module
Function NodePublishOpts.token is not accessible from the node module
version() 🔗
Return Type
String !
Example
Function NodePublishOpts.version is not accessible from the node module
Function NodePublishOpts.version is not accessible from the node module
Function NodePublishOpts.version is not accessible from the node module
Function NodePublishOpts.version is not accessible from the node module
access() 🔗
Return Type
String !
Example
Function NodePublishOpts.access is not accessible from the node module
Function NodePublishOpts.access is not accessible from the node module
Function NodePublishOpts.access is not accessible from the node module
Function NodePublishOpts.access is not accessible from the node module
InstallOpts 🔗
pkg() 🔗
Return Type
[String ! ] !
Example
Function NodeInstallOpts.pkg is not accessible from the node module
Function NodeInstallOpts.pkg is not accessible from the node module
Function NodeInstallOpts.pkg is not accessible from the node module
Function NodeInstallOpts.pkg is not accessible from the node module