Dagger
Search

node

No long description provided.

Installation

dagger install github.com/dagger/dagger/sdk/typescript/dev/node@9e59bae142f64975b7c9ad851e6bd4901d43513a

Entrypoint

Return Type
Commands !
Arguments
NameTypeDescription
ctrContainer !No description provided
Example
Function Commands.Constructor is not accessible from the node module
Function Commands.Constructor is not accessible from the node module
Function Commands.Constructor is not accessible from the node module

Entrypoint

Return Type
Node !
Arguments
NameTypeDescription
versionString No description provided
ctrContainer No description provided
Example
func (m *myModule) example() *Node  {
	return dag.
			Node()
}
@function
def example() -> dag.Node:
	return (
		dag.node()
	)
@func()
example(): Node {
	return dag
		.node()
}

Types

Commands

run()

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
args[String ! ] !-No description provided
Example
dagger -m github.com/dagger/dagger/sdk/typescript/dev/node@9e59bae142f64975b7c9ad851e6bd4901d43513a call \
 commands \
 run --args string1 --args string2
func (m *myModule) example(args []string) *Container  {
	return dag.
			Node().
			Commands().
			Run(args)
}
@function
def example(args: List[str]) -> dagger.Container:
	return (
		dag.node()
		.commands()
		.run(args)
	)
@func()
example(args: string[]): Container {
	return dag
		.node()
		.commands()
		.run(args)
}

lint()

Return Type
Container !
Example
dagger -m github.com/dagger/dagger/sdk/typescript/dev/node@9e59bae142f64975b7c9ad851e6bd4901d43513a call \
 commands \
 lint
func (m *myModule) example() *Container  {
	return dag.
			Node().
			Commands().
			Lint()
}
@function
def example() -> dagger.Container:
	return (
		dag.node()
		.commands()
		.lint()
	)
@func()
example(): Container {
	return dag
		.node()
		.commands()
		.lint()
}

test()

Return Type
Container !
Example
dagger -m github.com/dagger/dagger/sdk/typescript/dev/node@9e59bae142f64975b7c9ad851e6bd4901d43513a call \
 commands \
 test
func (m *myModule) example() *Container  {
	return dag.
			Node().
			Commands().
			Test()
}
@function
def example() -> dagger.Container:
	return (
		dag.node()
		.commands()
		.test()
	)
@func()
example(): Container {
	return dag
		.node()
		.commands()
		.test()
}

build()

Return Type
Container !
Example
dagger -m github.com/dagger/dagger/sdk/typescript/dev/node@9e59bae142f64975b7c9ad851e6bd4901d43513a call \
 commands \
 build
func (m *myModule) example() *Container  {
	return dag.
			Node().
			Commands().
			Build()
}
@function
def example() -> dagger.Container:
	return (
		dag.node()
		.commands()
		.build()
	)
@func()
example(): Container {
	return dag
		.node()
		.commands()
		.build()
}

Node

version()

Return Type
String !
Example
dagger -m github.com/dagger/dagger/sdk/typescript/dev/node@9e59bae142f64975b7c9ad851e6bd4901d43513a call \
 version
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			Node().
			Version(ctx)
}
@function
async def example() -> str:
	return await (
		dag.node()
		.version()
	)
@func()
async example(): Promise<string> {
	return dag
		.node()
		.version()
}

container()

Return Type
Container !
Example
dagger -m github.com/dagger/dagger/sdk/typescript/dev/node@9e59bae142f64975b7c9ad851e6bd4901d43513a 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()

Add source to the module container.

Return Type
Node !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-The source directory to mount in the container.
cacheCacheVolume -The cache to use for the node_modules cache (default to "node-modules").
Example
dagger -m github.com/dagger/dagger/sdk/typescript/dev/node@9e59bae142f64975b7c9ad851e6bd4901d43513a call \
 with-source --source DIR_PATH \
 commands \
 run --args string1 --args string2
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)
}

withYarn()

Add yarn as package manager in the container.

This also update the container entrypoint to “yarn”.

Return Type
Node !
Arguments
NameTypeDefault ValueDescription
cacheCacheVolume -The cache to use for the downloaded packages (default to "node-module-yarn").
Example
dagger -m github.com/dagger/dagger/sdk/typescript/dev/node@9e59bae142f64975b7c9ad851e6bd4901d43513a call \
 with-yarn \
 commands \
 run --args string1 --args string2
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()
}

withNpm()

Add npm as package manager in the container.

This also update the container entrypoint to “npm”.

Return Type
Node !
Arguments
NameTypeDefault ValueDescription
cacheCacheVolume -The cache to use for the downloaded packages (default to "node-module-npm").
Example
dagger -m github.com/dagger/dagger/sdk/typescript/dev/node@9e59bae142f64975b7c9ad851e6bd4901d43513a call \
 with-npm \
 commands \
 run --args string1 --args string2
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()
}

withPnpm()

Add pnpm as package manager in the container.

This also update the container entrypoint to “pnpm”.

Return Type
Node !
Arguments
NameTypeDefault ValueDescription
cacheCacheVolume -The cache to use for the downloaded packages (default to "node-module-pnpm").
Example
dagger -m github.com/dagger/dagger/sdk/typescript/dev/node@9e59bae142f64975b7c9ad851e6bd4901d43513a call \
 with-pnpm \
 commands \
 run --args string1 --args string2
func (m *myModule) example() *Node  {
	return dag.
			Node().
			WithPnpm()
}
@function
def example() -> dag.Node:
	return (
		dag.node()
		.with_pnpm()
	)
@func()
example(): Node {
	return dag
		.node()
		.withPnpm()
}

install()

Downloads dependencies in the container.

Return Type
Node !
Arguments
NameTypeDefault ValueDescription
pkgs[String ! ] ![]Additional packages to install in the container.
Example
dagger -m github.com/dagger/dagger/sdk/typescript/dev/node@9e59bae142f64975b7c9ad851e6bd4901d43513a call \
 install --pkgs string1 --pkgs string2 \
 commands \
 run --args string1 --args string2
func (m *myModule) example(pkgs []string) *Node  {
	return dag.
			Node().
			Install(pkgs)
}
@function
def example(pkgs: List[str]) -> dag.Node:
	return (
		dag.node()
		.install(pkgs)
	)
@func()
example(pkgs: string[]): Node {
	return dag
		.node()
		.install(pkgs)
}

commands()

Execute commands in the container.

Return Type
Commands !
Example
dagger -m github.com/dagger/dagger/sdk/typescript/dev/node@9e59bae142f64975b7c9ad851e6bd4901d43513a call \
 commands \
 run --args string1 --args string2
func (m *myModule) example() *NodeCommands  {
	return dag.
			Node().
			Commands()
}
@function
def example() -> dag.NodeCommands:
	return (
		dag.node()
		.commands()
	)
@func()
example(): NodeCommands {
	return dag
		.node()
		.commands()
}