package
cloudventure-io/package/nodejs
Terraform module for packaging NodeJS modules
Terraform Module NodeJS Package This module packages the nodejs module code. It scans the target directories and outputs map of filename to filepaths for files matching to specified pattern. This is a helper module to build NodeJS modules with terraform. The output of this module can be combined with other modules to construct module dependencies. This module will NOT do dependency resolution of child modules, it simply adds dependencies of sub-modules to node_modules directory of each sub-module. Example Package all .js files from src directory. ``hcl module "code" { source = "cloudventure-io/package/nodejs" version = "~> 1.0" files = [ { path = "${path.module}/src" include = [".js"] exclude = ["\\.test\\.js$"] }, { path = "${path.module}" include = ["LICENSE"] exclude = [] }, ] } output
| Name | Type | Description | Default |
|---|---|---|---|
| files | list(object({ path = st | The list of files for the modules. `path` and `include` patterns are passed to | required |
| modules | list(object({ name = stri | The list of sub-modules. Each module will be included output files map under th | [] |
files — Map of `filename => filepath` entries, including sub-moduled.