- Features
- Requirements
- Setup
- Usage
- Development
- Testing
- Troubleshooting
- Security
- API
- Packaging
- Examples
- Support
- License
- Links
This template owns its starter library surface and examples; each derived package owns its implementation and public API.
Package description: A reusable starting point for Eliware Node.js libraries using native ESM. Author: Eliware eliware@eliware.org. License: MIT.
Purpose: @eliware/library-template provides a baseline structure and example API for derived packages.
- Provides a small, tested native ESM library surface.
- Includes public declarations, examples, documentation, and release notes.
- Uses shared validation scripts and an explicit package contents allowlist.
Documentation: docs · specifications
- Node.js 26.x with native ESM support.
- No environment variables or runtime configuration files are required.
Run npm install @eliware/library-template to install the package. The package.json version reflects this checkout and does not confirm publication. Check the npm registry for the latest published version before installing. The public runtime entrypoint is src/index.mjs and declarations are in src/index.d.ts.
This starter API has no runtime settings, environment variables, or configuration files. Derived libraries should document any runtime configuration introduced by their API; package metadata and deployment settings are not runtime configuration.
Import the public function from @eliware/library-template:
import { createGreeting } from "@eliware/library-template";
console.log(createGreeting("Eli"));Prerequisites: Node.js 26 and an ESM project with the package installed. Command: node examples/basic.mjs. Expected result: the command prints Hello, Eli!. The package entrypoint is src/index.mjs; declarations are in src/index.d.ts. Check the npm registry for the latest published release; package metadata does not confirm publication.
Read AGENTS.md, docs/README.md, and specs/README.md before changing the package. Source modules live under src/ and tests mirror them under tests/. Replace the sample API and metadata when creating a derived library.
Run npm test for aggregate validation, coverage, and typechecking. Use npm run lint, npm run audit, npm run format:check, npm run typecheck, and npm run pack for the applicable focused checks. npm run format writes formatted files; npm run format:check is read-only.
Use Node.js 26 and update tests, declarations, examples, and API documentation together when changing the public API.
The starter API uses no credentials, environment variables, or network services. Do not add secrets or private machine-specific values to source, tests, examples, or package contents.
The public entrypoint exports createGreeting(name?: string): string. It returns a greeting and uses world when the name is omitted.
The package allowlist is src/, docs/, README.md, AGENTS.md, LICENSE, RELEASE_NOTES.md, and examples/.
Validate packed contents with npm run pack; the shared pack check must pass and the packed files must match the allowlist before release consideration.
Public publication uses npm provenance and an exact version tag matching package.json after Ubuntu validation. Verify the exact version in the npm registry after an explicitly authorized publication handoff.
The runnable example and its prerequisites are indexed in examples/README.md. Start with the basic example, which uses no credentials or external services.
Use the Eliware Discord community, GitHub issues, or eliware@eliware.org. Include the relevant API or example and a concise description of the issue when requesting help.
MIT. See LICENSE.

