@mtrangio/mtd-pkg
v0.5.0
Published
A minimal demo package showing how to publish an NPM package using modern tooling.
Readme
mtd-pkg
A minimal demo package showing how to publish an NPM package using modern tooling.
Overview
This repository contains a simple TypeScript package template with a pnpm workflow. It demonstrates the modern package publishing process:
- install dependencies with
pnpm - build the package using TypeScript
- publish to npm from a local repository
Prerequisites
- Node.js 20+ installed
pnpminstalled globally- an npm account
npm logincompleted before publishing
Setup
Install dependencies with pnpm:
pnpm installBuild
If you want to compile the TypeScript source before publishing, run:
pnpm exec tscThis project currently uses index.ts as its source entry point and index.js as the published bundle entry point.
Publish to npm
- Make sure the package version is correct in
package.json. - Run
npm loginif you have not already authenticated. - Publish the package:
pnpm publish --access publicIf you prefer npm directly, use:
npm publish --access publicNotes
- The package is named
mtd-pkginpackage.json. - The repository currently has no tests configured.
- Add a
description,repository, andkeywordstopackage.jsonto improve the package listing on npm.
License
MIT
