{"id":18671683,"url":"https://github.com/penseapp/template-npm-package","last_synced_at":"2026-04-12T11:33:01.450Z","repository":{"id":42520510,"uuid":"442872642","full_name":"penseapp/template-npm-package","owner":"penseapp","description":"A reusable template to quickly start a package of NPM with TS","archived":false,"fork":false,"pushed_at":"2023-03-07T06:50:13.000Z","size":451,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-27T19:24:19.216Z","etag":null,"topics":["easy-to-use","node","nodejs","npm","npm-package","package","starter-kit","starter-template","typescript"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/penseapp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-29T19:36:48.000Z","updated_at":"2022-02-08T14:01:25.000Z","dependencies_parsed_at":"2023-02-08T02:02:19.025Z","dependency_job_id":null,"html_url":"https://github.com/penseapp/template-npm-package","commit_stats":null,"previous_names":[],"tags_count":6,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/penseapp%2Ftemplate-npm-package","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/penseapp%2Ftemplate-npm-package/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/penseapp%2Ftemplate-npm-package/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/penseapp%2Ftemplate-npm-package/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/penseapp","download_url":"https://codeload.github.com/penseapp/template-npm-package/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239509968,"owners_count":19650888,"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":["easy-to-use","node","nodejs","npm","npm-package","package","starter-kit","starter-template","typescript"],"created_at":"2024-11-07T09:06:46.998Z","updated_at":"2025-11-06T21:30:32.783Z","avatar_url":"https://github.com/penseapp.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# npm-package-template\n\n\u003c!-- \u003cdiv align=\"center\"\u003e --\u003e\n\n\u003c!-- ![npm](https://img.shields.io/npm/dt/nodejs-health-checker?style=for-the-badge)\u003cbr\u003e --\u003e\n\n[![npm version](https://badge.fury.io/js/%40penseapp%2Fnpm-package-template.svg)](https://badge.fury.io/js/%40penseapp%2Fnpm-package-template)\n[![Tag Status](https://img.shields.io/github/tag/penseapp/npm-package-template)](https://img.shields.io/github/v/tag/penseapp/npm-package-template)\n[![License Status](https://img.shields.io/github/license/penseapp/npm-package-template)](https://img.shields.io/github/license/penseapp/npm-package-template)\n[![Issues Status](https://img.shields.io/github/issues/penseapp/npm-package-template)](https://img.shields.io/github/issues/penseapp/npm-package-template)\n\n\u003c!-- ![test](https://github.com/penseapp/npm-package-template/workflows/test/badge.svg?branch=master) --\u003e\n\u003c!-- ![GitHub Workflow Status (event)](https://img.shields.io/github/workflow/status/@penseapp/npm-package-template/test) --\u003e\n\u003c!-- [![Coverage Status](https://coveralls.io/repos/github/penseapp/npm-package-template/badge.svg?branch=master)](https://coveralls.io/github/penseapp/npm-package-template?branch=master) --\u003e\n\n\u003c!-- \u003c/div\u003e --\u003e\n\nThis is a template file that you can extend to create your own NPM package!\n\n## How to use\n\nClone this repository on any folder\n\n```shell\ncd ~/my-folder/some-folder\ngit clone git@github.com:penseapp/npm-package-template.git\n```\n\nOpen the `package.json` file and edit these props:\n\n| Prop name  | Description | Example | \n|---|---|---|\n| name  | The same package name registered on NPM  | @penseapp/my-package-name  |\n| version  | The first version of package (It will increment automatically later  | 1.0.0  |\n| description  | It'll appear on NPM/Github  | This package to A,B,C  |\n\nOpen the `README.MD` and update your package instructions\n\n## Tests\n\nThis packages is configured to use JEST with TS.\n\nYou can create tests on `/tests/` folder and if you want to change the directory to the `src` along the other files, follow this steps:\n\nChange the `format` script on `package.json`\n\n```diff\n- \"format\": \"prettier --config .prettierrc.json --ignore-unknown --write \\\"src/**/*.ts\\\" \\\"tests/**/*.ts\\\"\",\n+ \"format\": \"prettier --config .prettierrc.json --ignore-unknown --write \\\"src/**/*.ts\\\"\",\n```\n\nChange the `include` section on `tsconfig.json`\n\n```diff\n- \"include\": [\"src/**/*\", \"tests/index.spec.ts\"],,\n+ \"include\": [\"src/**/*\", \"src/**/*.spec.*\"],,\n```\n\n## NPM\n\nCreate an account or login on [NPM](https://www.npmjs.com/login)\n\nGo to the `packages` section. (Here you need to choose to create on a personal account or organization)\n\nFor example:\n```\nhttps://www.npmjs.com/settings/penseapp/packages\n```\n\nFollow the tutorial:\nhttps://jamescalmus.medium.com/how-to-publish-a-scoped-npm-package-for-your-organization-767af1c99b9f\n\n\n### NPM AUTH TOKEN\n\nThe package uses https://github.com/mikeal/merge-release to deploy to NPM\n\nWe need to configure the `NPM_AUTH_TOKEN` on github secrets because the `.github/workflows/deploy.yml` \nhas the call of the token\n\nGenerate a new token:\nhttps://docs.npmjs.com/creating-and-viewing-access-tokens\n\nCopy and add to your github secrets with the `NPM_TOKEN` key\n\n## Github\n\nCreate a new repository on github\n\nCreate a manual tag and release (Only the first time) on the same version of the packge.json and publish the release\n\u003e On this example, the version is 1.0.0\n\n\nDelete this \"default GIT\" folder\n\n```\nrm -rf .git\n```\n\nand add the files to your repo\n\n```\ngit add .\ngit commit -m 'chore: first version'\ngit branch -M master\ngit remote add origin git@github.com:penseapp/npm-package-template.git\ngit push -u origin master\n```\n\nIf everything is ok, the github should start the pipeline deploy\n\n## How to install the package\n\nTODO:\n-[] Replace the `@penseapp/npm-package-template` to your package name\n\n```\nyarn add @penseapp/npm-package-template\n```\n\nor\n\n```\nnpm i @penseapp/npm-package-template\n```\n\n## Github actions\n\nThis package uses the workflows/pipelines on the `.github` folder to trigger\ngithub actions pipelines to automatize deploy on NPM and chore things.\n\n- Deploy automatically on NPM\n- Bump `package.json` version automatically\n- Bump `github version` automatically\n- Bump `npm version` automatically\n- Label the PR's automatically.\n\n## Commitlint\n\n-[] Enforce the commitlint\n\n## Discord integration\n\nThis package has a custom integration to Discord server. If you want to receive\nnotifications on your preferred channel, follow the steps bellow.\n\nIf not, delete or comment the `Discord notification` pipelines on `.github/workflows/deploy.yml` github action file.\n\n```\nOpen Discord -\u003e select the channel -\u003e Click on configuration -\u003e Integrations -\u003e View webhooks -\u003e New webhook\n```\n\nCreate a new webhook called `Discord notification` and add on Github secrets with a name of `DISCORD_CHANNEL_WEBHOOK`, like the GIF bellow:\n\n![Peek 2021-06-02 22-21](https://user-images.githubusercontent.com/5152197/121472497-aa56ec00-c997-11eb-83cb-b9f03094e5dd.gif)\n\nNow, you will receive the notifications on the desired discord channel.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpenseapp%2Ftemplate-npm-package","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpenseapp%2Ftemplate-npm-package","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpenseapp%2Ftemplate-npm-package/lists"}