imgs-publisher-lib-commons
v0.0.5
Published
A boilerplate for creating and publishing TypeScript libraries to NPM. This template provides a foundation for your next project, including a pre-configured setup for linting, and automated publishing via GitHub Actions.
Downloads
542
Readme
NPM Library Boilerplate
A boilerplate for creating and publishing TypeScript libraries to NPM. This template provides a foundation for your next project, including a pre-configured setup for linting, and automated publishing via GitHub Actions.
Features
- TypeScript: Write your library with the power of static typing.
- ESLint: Maintain code quality with a pre-configured linter.
- GitHub Actions: Automated NPM publishing when you merge to the
mainbranch.
Getting Started
Follow these instructions to get a copy of the project up and running on your local machine for development and testing purposes.
Installation
- Fork or Clone:
- Fork this repository to your GitHub account.
- Clone your forked repository:
git clone https://github.com/YOUR_USERNAME/your-repo-name.git
- Install Dependencies:
npm install # or yarn install
Usage
This boilerplate is designed to be a starting point for your library.
- Update
package.json:- Change the fields to match your library.
- Its important to keep base name "@pacer-dev/" to be able to publish it to npm.
- Start Coding:
- Your library's source code goes into the
srcdirectory. The entry point issrc/index.ts.
- Your library's source code goes into the
Publishing
This boilerplate is configured to automatically publish your library to NPM when a feature branch is merged into main.
Preventing Publishing
To prevent automatic publishing to NPM, you can set a repository variable named PREVENT_PUBLISH to true. When this variable is set, the NPM publish job will be skipped.
