Dagger
Search

angular

Angular build, lint, test, and serve utilities for Dagger pipelines.

Installation

dagger install github.com/telchak/daggerverse/angular@v0.1.0

Entrypoint

Return Type
Angular !
Example
dagger -m github.com/telchak/daggerverse/angular@010621c997378db92da5969584001be575c5e5a7 call \
func (m *MyModule) Example() *dagger.Angular  {
	return dag.
			Angular()
}
@function
def example() -> dagger.Angular:
	return (
		dag.angular()
	)
@func()
example(): Angular {
	return dag
		.angular()
}

Types

Angular 🔗

Angular build, lint, test, and serve utilities for Dagger pipelines.

build() 🔗

Build an Angular project and return the dist directory.

Runs ng build with the specified configuration. Auto-detects the output path from angular.json if not explicitly provided.

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
sourceDirectory -

Angular project source directory

configurationString !"production"

Build configuration (e.g. ‘production’, ‘development’)

outputPathString !""

Custom output path (auto-detected from angular.json if empty)

nodeVersionString !"22"

Node.js version

npmCacheCacheVolume null

Custom npm cache volume (uses default if not provided)

Example
dagger -m github.com/telchak/daggerverse/angular@010621c997378db92da5969584001be575c5e5a7 call \
 build --configuration string --output-path string --node-version string
func (m *MyModule) Example(configuration string, outputPath string, nodeVersion string) *dagger.Directory  {
	return dag.
			Angular().
			Build(configuration, outputPath, nodeVersion)
}
@function
def example(configuration: str, output_path: str, node_version: str) -> dagger.Directory:
	return (
		dag.angular()
		.build(configuration, output_path, node_version)
	)
@func()
example(configuration: string, outputPath: string, nodeVersion: string): Directory {
	return dag
		.angular()
		.build(configuration, outputPath, nodeVersion)
}

install() 🔗

Install Angular project dependencies.

Runs npm ci (or npm install if no lockfile) and returns the source directory with node_modules.

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
sourceDirectory -

Angular project source directory

nodeVersionString !"22"

Node.js version

npmCacheCacheVolume null

Custom npm cache volume (uses default if not provided)

Example
dagger -m github.com/telchak/daggerverse/angular@010621c997378db92da5969584001be575c5e5a7 call \
 install --node-version string
func (m *MyModule) Example(nodeVersion string) *dagger.Directory  {
	return dag.
			Angular().
			Install(nodeVersion)
}
@function
def example(node_version: str) -> dagger.Directory:
	return (
		dag.angular()
		.install(node_version)
	)
@func()
example(nodeVersion: string): Directory {
	return dag
		.angular()
		.install(nodeVersion)
}

lint() 🔗

Lint an Angular project using ng lint.

Returns the lint output. Requires @angular-eslint to be configured.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
sourceDirectory -

Angular project source directory

fixBoolean !false

Automatically fix lint errors

nodeVersionString !"22"

Node.js version

npmCacheCacheVolume null

Custom npm cache volume (uses default if not provided)

Example
dagger -m github.com/telchak/daggerverse/angular@010621c997378db92da5969584001be575c5e5a7 call \
 lint --fix boolean --node-version string
func (m *MyModule) Example(ctx context.Context, fix bool, nodeVersion string) string  {
	return dag.
			Angular().
			Lint(ctxfix, nodeVersion)
}
@function
async def example(fix: bool, node_version: str) -> str:
	return await (
		dag.angular()
		.lint(fix, node_version)
	)
@func()
async example(fix: boolean, nodeVersion: string): Promise<string> {
	return dag
		.angular()
		.lint(fix, nodeVersion)
}

serve() 🔗

Start the Angular development server.

Returns a Dagger Service running ng serve.

Return Type
Service !
Arguments
NameTypeDefault ValueDescription
sourceDirectory -

Angular project source directory

portInteger !4200

Port to serve on

nodeVersionString !"22"

Node.js version

npmCacheCacheVolume null

Custom npm cache volume (uses default if not provided)

Example
dagger -m github.com/telchak/daggerverse/angular@010621c997378db92da5969584001be575c5e5a7 call \
 serve --port integer --node-version string
func (m *MyModule) Example(port int, nodeVersion string) *dagger.Service  {
	return dag.
			Angular().
			Serve(port, nodeVersion)
}
@function
def example(port: int, node_version: str) -> dagger.Service:
	return (
		dag.angular()
		.serve(port, node_version)
	)
@func()
example(port: number, nodeVersion: string): Service {
	return dag
		.angular()
		.serve(port, nodeVersion)
}

test() 🔗

Run Angular project tests using ng test.

Returns the test output.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
sourceDirectory -

Angular project source directory

watchBoolean !false

Run tests in watch mode

browsersString !"ChromeHeadless"

Browser to use for tests

nodeVersionString !"22"

Node.js version

npmCacheCacheVolume null

Custom npm cache volume (uses default if not provided)

Example
dagger -m github.com/telchak/daggerverse/angular@010621c997378db92da5969584001be575c5e5a7 call \
 test --watch boolean --browsers string --node-version string
func (m *MyModule) Example(ctx context.Context, watch bool, browsers string, nodeVersion string) string  {
	return dag.
			Angular().
			Test(ctxwatch, browsers, nodeVersion)
}
@function
async def example(watch: bool, browsers: str, node_version: str) -> str:
	return await (
		dag.angular()
		.test(watch, browsers, node_version)
	)
@func()
async example(watch: boolean, browsers: string, nodeVersion: string): Promise<string> {
	return dag
		.angular()
		.test(watch, browsers, nodeVersion)
}