josiah-random-name-kit
v1.0.0
Published
A tiny random name generator for demos and beginner npm publishing.
Maintainers
Readme
josiah-random-name-kit
A tiny random name generator package. This is intentionally simple so you can learn how npm packages are built and published.
Install
npm install josiah-random-name-kitOn this Windows machine, use npm.cmd if PowerShell blocks npm:
npm.cmd install josiah-random-name-kitUse in JavaScript
import { generateName, generateNames } from "josiah-random-name-kit";
console.log(generateName());
console.log(generateNames(3));
console.log(generateName({ includeMiddleInitial: true }));Use from the terminal
npx random-name
npx random-name 5Publish Your Own Package
Before publishing, make sure the name in package.json is unique. npm package names are global, so josiah-random-name-kit may already be taken by the time you publish.
Good beginner naming options:
josiah-random-name-kitrandom-name-kit-josiah@your-npm-username/random-name-kit
Then run:
npm login
npm test
npm publish --access publicIf you are using PowerShell and npm is blocked, use:
npm.cmd login
npm.cmd test
npm.cmd publish --access publicFor scoped packages like @your-npm-username/random-name-kit, --access public is required for a free public package.
Updating Later
After making changes, increase the version number:
npm version patch
npm publishUse patch for bug fixes, minor for new features, and major for breaking changes.
