npm-test-nitouche84
v1.0.0
Published
A demo npm package to test TypeScript publishing
Readme
NPM Test Nitouche84
A demo npm package to test TypeScript publishing workflow.
Features
- Written in TypeScript
- Compiles to JavaScript
- Includes CLI functionality
- Automatic build before publishing
- Properly configured for npm publishing
Scripts
npm run build- Compiles TypeScript to JavaScriptnpm run dev- Watches for changes and compiles automaticallynpm start- Runs the compiled JavaScriptnpm run prepublishOnly- Builds before publishing (runs automatically)
Usage as CLI
After installation, you can use this package as a CLI tool:
npm-test-nitouche84 [arguments]Usage as Library
You can also use this as a library in other projects:
const { greet, add } = require('npm-test-nitouche84');
console.log(greet('World')); // Hello, World! This is a demo npm package built with TypeScript.
console.log(add(2, 3)); // 5Publishing
This package is set up to automatically compile TypeScript before publishing thanks to the prepublishOnly script.
