{"id":19975404,"url":"https://github.com/briangershon/npm-package-minimal","last_synced_at":"2026-02-10T04:33:07.750Z","repository":{"id":54537790,"uuid":"305030584","full_name":"briangershon/npm-package-minimal","owner":"briangershon","description":"A starter template for building a TypeScript-based library module published (privately or publicly) to Github Packages in ESM module format. Includes vitest testing and Github Actions for publishing.","archived":false,"fork":false,"pushed_at":"2024-11-04T04:53:58.000Z","size":213,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-03T12:38:12.576Z","etag":null,"topics":["esm","esmodule","github-actions","npm-package","starter-template","vite","vitest"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/briangershon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-18T05:36:52.000Z","updated_at":"2024-11-04T04:54:02.000Z","dependencies_parsed_at":"2024-11-13T03:18:22.991Z","dependency_job_id":"0120595c-75e0-410e-a5b8-5a5c46fbf2ac","html_url":"https://github.com/briangershon/npm-package-minimal","commit_stats":null,"previous_names":[],"tags_count":11,"template":true,"template_full_name":null,"purl":"pkg:github/briangershon/npm-package-minimal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/briangershon%2Fnpm-package-minimal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/briangershon%2Fnpm-package-minimal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/briangershon%2Fnpm-package-minimal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/briangershon%2Fnpm-package-minimal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/briangershon","download_url":"https://codeload.github.com/briangershon/npm-package-minimal/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/briangershon%2Fnpm-package-minimal/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29290991,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T03:42:42.660Z","status":"ssl_error","status_checked_at":"2026-02-10T03:42:41.897Z","response_time":65,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["esm","esmodule","github-actions","npm-package","starter-template","vite","vitest"],"created_at":"2024-11-13T03:18:14.830Z","updated_at":"2026-02-10T04:33:07.730Z","avatar_url":"https://github.com/briangershon.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# npm-package-minimal\n\nExample of publishing an NPM package to Github Packages via Github Actions.\n\nThis is useful for developing private packages you use internally and don't want to publish to the public NPM registry.\n\nFeatures:\n\n- Vite tooling\n- Testing and code coverage via vitest\n- TypeScript\n- Publish as ESM\n- Github Actions for testing and publishing package\n- eslint and prettier for code formatting\n\n## How to clone this repo for your own NPM module\n\nThis is a template, so you can clone the repo by clicking `Use this template` in Github.\n\nThen make the following changes:\n\n- in `package.json`:\n  - update all the `@briangershon` to your account name\n  - replace `npm-package-minimal` with the name of your repo. The `name` field is particularly important since this is needed for publishing your module. Name should have the format `@your-github-username/your-repo-name`.\n  - reset your `version` to an initial value `0.0.0`. Note: You'll update this version when publishing package.\n- update `LICENSE` file with your own name or license.\n- update `README.md` with your own content.\n- optional update `.prettierrc.json` or `eslint.config.js` with your own settings.\n\n## How to `npm install` this package in your own application\n\nSince this module is being deployed to the GitHub package repository (instead of the default NPM registry), you need to tell `npm` how to find the package.\n\nFirst create your own personal github token with `repo` and `read:packages` scopes, which you'll use as your password in the next step.\n\nUse your own `--scope` value instead of `@briangershon`.\n\n```bash\nnpm login --registry=https://npm.pkg.github.com --scope=@briangershon\n```\n\nIn your project, install this package like so:\n\n```bash\nnpm install @briangershon/npm-package-minimal\n```\n\n## Run tests while developing this package\n\n```bash\nnpm run test:watch\n```\n\nor without watch:\n\n```bash\nnpm test\n```\n\n## Run while developing\n\n```bash\nnpm run build:watch\n```\n\n## To release new version of this package\n\n- for first time run, ensure your repo's GitHub Actions have the correct permissions to publish a package. Go to repo's `Settings \u003e Actions \u003e General \u003e Workflow Permissions` and choose `Read and Write Permissions`.\n- create a PR for your branch\n- merge your PR to `main`\n- on your local machine, run `git pull` to bring down latest `main` changes\n- run `npm version patch -s -m \"my release\"` to bump the version number (`patch` can be replaced with `minor` or `major` versions), tag it, and push it to GitHub\n- publish package on GitHub package registry by creating a Release on github.com to trigger publish action\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbriangershon%2Fnpm-package-minimal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbriangershon%2Fnpm-package-minimal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbriangershon%2Fnpm-package-minimal/lists"}