frontend
No long description provided.
Installation
dagger install github.com/kpenfound/greetings-api/.dagger/frontend@a28fbf2146302b561de8d8c296c468d5f728dbe8
Entrypoint
Return Type
Frontend !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | No description provided |
Example
dagger -m github.com/kpenfound/greetings-api/.dagger/frontend@a28fbf2146302b561de8d8c296c468d5f728dbe8 call \
--source DIR_PATH
func (m *myModule) example(source *Directory) *Frontend {
return dag.
Frontend(source)
}
@function
def example(source: dagger.Directory) -> dag.Frontend:
return (
dag.frontend(source)
)
@func()
example(source: Directory): Frontend {
return dag
.frontend(source)
}
Types
Frontend 🔗
source() 🔗
Return Type
Directory !
Example
dagger -m github.com/kpenfound/greetings-api/.dagger/frontend@a28fbf2146302b561de8d8c296c468d5f728dbe8 call \
--source DIR_PATH source
func (m *myModule) example(source *Directory) *Directory {
return dag.
Frontend(source).
Source()
}
@function
def example(source: dagger.Directory) -> dagger.Directory:
return (
dag.frontend(source)
.source()
)
@func()
example(source: Directory): Directory {
return dag
.frontend(source)
.source()
}
unitTest() 🔗
Test the frontend
Return Type
String !
Example
dagger -m github.com/kpenfound/greetings-api/.dagger/frontend@a28fbf2146302b561de8d8c296c468d5f728dbe8 call \
--source DIR_PATH unit-test
func (m *myModule) example(ctx context.Context, source *Directory) string {
return dag.
Frontend(source).
UnitTest(ctx)
}
@function
async def example(source: dagger.Directory) -> str:
return await (
dag.frontend(source)
.unit_test()
)
@func()
async example(source: Directory): Promise<string> {
return dag
.frontend(source)
.unitTest()
}
build() 🔗
Build the frontend hugo static site
Return Type
Directory !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
env | String | - | +default "dev" |
Example
dagger -m github.com/kpenfound/greetings-api/.dagger/frontend@a28fbf2146302b561de8d8c296c468d5f728dbe8 call \
--source DIR_PATH build
func (m *myModule) example(source *Directory) *Directory {
return dag.
Frontend(source).
Build()
}
@function
def example(source: dagger.Directory) -> dagger.Directory:
return (
dag.frontend(source)
.build()
)
@func()
example(source: Directory): Directory {
return dag
.frontend(source)
.build()
}
lint() 🔗
Lint the frontend Go code
Return Type
String !
Example
dagger -m github.com/kpenfound/greetings-api/.dagger/frontend@a28fbf2146302b561de8d8c296c468d5f728dbe8 call \
--source DIR_PATH lint
func (m *myModule) example(ctx context.Context, source *Directory) string {
return dag.
Frontend(source).
Lint(ctx)
}
@function
async def example(source: dagger.Directory) -> str:
return await (
dag.frontend(source)
.lint()
)
@func()
async example(source: Directory): Promise<string> {
return dag
.frontend(source)
.lint()
}
serve() 🔗
Get a service to run the frontend webservice
Return Type
Service !
Example
dagger -m github.com/kpenfound/greetings-api/.dagger/frontend@a28fbf2146302b561de8d8c296c468d5f728dbe8 call \
--source DIR_PATH serve
func (m *myModule) example(source *Directory) *Service {
return dag.
Frontend(source).
Serve()
}
@function
def example(source: dagger.Directory) -> dagger.Service:
return (
dag.frontend(source)
.serve()
)
@func()
example(source: Directory): Service {
return dag
.frontend(source)
.serve()
}