npm
Install NPM packages.
Installation
dagger install github.com/jedevc/daggerverse/npm@v1.0.0
Entrypoint
Return Type
Npm
Example
dagger -m github.com/jedevc/daggerverse/npm@669bcff4b7700a5d6338770409fbbf0d0e33d645 call \
func (m *myModule) example() *Npm {
return dag.
Npm()
}
@function
def example() -> dag.Npm:
return (
dag.npm()
)
@func()
example(): Npm {
return dag
.npm()
}
Types
Npm 🔗
nodeModules() 🔗
Installs npm packages into the node_modules/ directory using the package files
Return Type
Directory !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
dir | Directory ! | - | No description provided |
Example
dagger -m github.com/jedevc/daggerverse/npm@669bcff4b7700a5d6338770409fbbf0d0e33d645 call \
node-modules --dir DIR_PATH
func (m *myModule) example(dir *Directory) *Directory {
return dag.
Npm().
NodeModules(dir)
}
@function
def example(dir: dagger.Directory) -> dagger.Directory:
return (
dag.npm()
.node_modules(dir)
)
@func()
example(dir: Directory): Directory {
return dag
.npm()
.nodeModules(dir)
}