{"id":25029095,"url":"https://github.com/lsphillips/npm-package-generator","last_synced_at":"2025-10-20T17:30:40.134Z","repository":{"id":154221801,"uuid":"622733399","full_name":"lsphillips/npm-package-generator","owner":"lsphillips","description":"A Terraform module that enables you to quickly create a NPM package repository following all my opinionated conventions.","archived":false,"fork":false,"pushed_at":"2023-11-07T21:56:23.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-11-08T06:36:59.824Z","etag":null,"topics":["github","terraform-module"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lsphillips.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-04-03T00:19:30.000Z","updated_at":"2023-04-03T00:41:50.000Z","dependencies_parsed_at":"2023-11-08T04:47:05.174Z","dependency_job_id":"5acb08ec-e770-4d9d-a2ff-fb2b04aa66e9","html_url":"https://github.com/lsphillips/npm-package-generator","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lsphillips%2Fnpm-package-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lsphillips%2Fnpm-package-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lsphillips%2Fnpm-package-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lsphillips%2Fnpm-package-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lsphillips","download_url":"https://codeload.github.com/lsphillips/npm-package-generator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237372974,"owners_count":19299675,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github","terraform-module"],"created_at":"2025-02-05T20:58:53.255Z","updated_at":"2025-10-20T17:30:34.853Z","avatar_url":"https://github.com/lsphillips.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `npm-package-repository`\n\nA Terraform module that enables you to quickly create a NPM package repository following all _my_ opinionated conventions.\n\n## Usage\n\nThis module uses the [GitHub Provider](https://registry.terraform.io/providers/integrations/github/latest/docs), therefore access needs to be granted by configuring a `GITHUB_TOKEN` environment variable with a token with the following **classic** scopes:\n\n- `repo`\n- `delete_repo` _(optional)_\n\nThis modules also requires `node` (and `npm`) to be installed in order to generate an initial `package-lock.json` file.\n\n### Using as a module\n\nCreate a `main.tf` file and utilize like any normal module:\n\n``` tf\nmodule \"test_package_repository\" {\n    source       = \"github.com/lsphillips/npm-package-generator\"\n    package_name = \"test-package\"\n    author_name  = \"Luke Phillips\"\n    author_email = \"lsphillips.projects@gmail.com\"\n}\n\noutput \"repository_url\" {\n    value = module.test_package_repository.package_repository_url\n}\n```\n\nYou can see a more complete example [here](example/test-package.tf).\n\n### Using via the CLI\n\nYou can also clone this repository and use the Terraform CLI:\n\n```\nterraform apply \\\n    -var package_name=\"test-package\" \\\n    -var author_name=\"Luke Phillips\" \\\n    -var author_email=\"lsphillips.projects@gmail.com\"\n```\n\n### Options\n\n| Variable                  | Type           | Required | Default    | Description                                                                                                              |\n| ------------------------- | :------------: | :------: | :--------: | ------------------------------------------------------------------------------------------------------------------------ |\n| `package_name`            | `string`       | **Yes**  |            | The name of the package being produced.                                                                                  |\n| `package_description`     | `string`       | **No**   |            | A short description describing the package.                                                                              |\n| `is_browser_package`      | `bool`         | **No**   | `true`     | Indicates whether the package is compatible with a web browser environment.                                              |\n| `is_node_package`         | `bool`         | **No**   | `true`     | Indicates whether the package is compatible with a NodeJS environment.                                                   |\n| `is_cli_package`          | `bool`         | **No**   | `false`    | Indicates whether the package includes a CLI executable to be installed into the PATH.                                   |\n| `supported_node_versions` | `list(number)` | **No**   | `[16, 18]` | A list of NodeJS versions that the package supports. Only applicable if `is_node_package` or `is_cli_package` is `true`. |\n| `author_name`             | `string`       | **Yes**  |            | The name of the author of the package.                                                                                   |\n| `author_email`            | `string`       | **Yes**  |            | The email address for the author of the package. This will be public!                                                    |\n| `is_public`               | `bool`         | **No**   | `false`    | Indicates if the package is to be public.                                                                                |\n\n### Outputs\n\n| Output                   | Type     | Description                                                                 |\n| ------------------------ | :------: | --------------------------------------------------------------------------- |\n| `package_repository_url` | `string` | The URL of the repository that can be used to clone the package repository. |\n\n## Manual Actions\n\nOnce the package repository is created you will still need to make the following manual actions:\n\n- Enable the `Allow GitHub Actions to create and approve pull requests` setting under `Settings \u003e Actions \u003e General`. This will ensure select Dependabot pull requests can be automatically approved and merged.\n- Remove all issue labels accept for the `bug` and `dependencies` tag.\n\n## License\n\nThis project is released under the [MIT license](LICENSE.txt).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flsphillips%2Fnpm-package-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flsphillips%2Fnpm-package-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flsphillips%2Fnpm-package-generator/lists"}