Dagger
Search

bun

Provides a set of functions for Bun projects

Installation

dagger install github.com/fluent-ci-templates/bun-pipeline@v0.6.13

Entrypoint

Return Type
Bun
Example
func (m *myModule) example() *Bun  {
	return dag.
			Bun()
}
@function
def example() -> dag.Bun:
	return (
		dag.bun()
	)
@func()
example(): Bun {
	return dag
		.bun()
}

Types

Bun 🔗

test() 🔗

Run tests

Return Type
String !
Arguments
NameTypeDefault ValueDescription
srcDirectory -No description provided
bunVersionString "latest"No description provided
Example
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			Bun().
			Test(ctx)
}
@function
async def example() -> str:
	return await (
		dag.bun()
		.test()
	)
@func()
async example(): Promise<string> {
	return dag
		.bun()
		.test()
}

run() 🔗

Run commands

Return Type
String !
Arguments
NameTypeDefault ValueDescription
commandString !-No description provided
srcDirectory -No description provided
bunVersionString "latest"No description provided
Example
func (m *myModule) example(ctx context.Context, command string) string  {
	return dag.
			Bun().
			Run(ctx, command)
}
@function
async def example(command: str) -> str:
	return await (
		dag.bun()
		.run(command)
	)
@func()
async example(command: string): Promise<string> {
	return dag
		.bun()
		.run(command)
}

build() 🔗

Transpile and bundle one or more files

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
srcDirectory -No description provided
entrypoints[String ! ] ["index.ts"]No description provided
outfileString -No description provided
bunVersionString "latest"No description provided
targetString -No description provided
compileBoolean falseNo description provided
outdirString -No description provided
sourcemapString -No description provided
minifyBoolean falseNo description provided
minifySyntaxBoolean falseNo description provided
minifyWhitespaceBoolean falseNo description provided
minifyIdentifiersBoolean falseNo description provided
splittingBoolean falseNo description provided
Example
func (m *myModule) example() *Directory  {
	return dag.
			Bun().
			Build()
}
@function
def example() -> dagger.Directory:
	return (
		dag.bun()
		.build()
	)
@func()
example(): Directory {
	return dag
		.bun()
		.build()
}