Typed public API
Root imports expose createGreeting and its TypeScript options type.

A TypeScript npm library template with Rollup builds for ESM, CommonJS, browser IIFE, source maps, declarations, tests, and release workflows.
npm install mazey-npm-template The repository keeps package source, browser development, API documentation, tests, and publishing responsibilities separate.
Root imports expose createGreeting and its TypeScript options type.
Rollup produces ESM, CommonJS, browser IIFE, declaration, and source-map files without runtime dependencies.
Jest, TypeScript, ESLint, Prettier, TypeDoc, package previews, and GitHub Actions are configured for maintainers.
Use the package through a module-aware project or load the browser bundle directly from a CDN.
TypeScript discovers the published declarations automatically; no separate @types package is required.
npm install mazey-npm-templateLoad the IIFE bundle when a package manager or bundler is not available. Pin an exact version for production use.
<script src="https://cdn.jsdelivr.net/npm/mazey-npm-template/lib/mazey-npm-template.min.js"></script>
<script>
const message = MAZEY_NPM_TEMPLATE.createGreeting("browser");
</script>Import from the package root. The sample API trims the provided name, falls back to friend for blank input, and accepts optional punctuation.
import { createGreeting } from "mazey-npm-template";
createGreeting("Cheng");
// "Hello, Cheng!"
createGreeting("community", { punctuation: "." });
// "Hello, community."The live playground runs createGreeting in your browser, lets you adjust its supported options, and displays the generated result immediately.
Package metadata directs consumers to the appropriate generated file while preserving a browser bundle for direct script usage.
lib/index.esm.jslib/index.cjslib/mazey-npm-template.min.jslib/index.d.tsSupported Chrome and Edge browsers may expose an install icon or the Install app action below. Other browsers may require their own menus; availability depends on the browser and platform.
On iPhone and iPad, Safari users can use Share, then Add to Home Screen. This does not provide exactly the same capabilities as a Chrome installation. Installing the website also does not grant native Fullscreen API support.