Skip to content

Repository files navigation

eliware.org

@eliware/library-template npm version license CI

Table of Contents

Features

Purpose: @eliware/library-template provides a baseline structure and example API for derived packages.

The package description is: A reusable starting point for Eliware Node.js libraries using native ESM.

  • 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.

Maintained by Eliware eliware@eliware.org. Author: Eliware eliware@eliware.org. License: MIT. See LICENSE.

Documentation: docs · specifications · examples

Requirements

  • Node.js 26.x with native ESM support.
  • No environment variables or runtime configuration files are required.

Setup

Run npm install @eliware/library-template to install the package. This checkout declares version 9.0.0 in package.json; verify the exact release in the npm registry before installing that version. The public runtime entrypoint is src/index.mjs and declarations are in index.d.ts.

Configuration

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.

Usage

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 index.d.ts. Check the npm registry to confirm the release or publication of version 9.0.0; package metadata does not confirm it.

Development

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.

Testing

Run npm test for aggregate validation and coverage. 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.

Troubleshooting

Use Node.js 26 and update tests, declarations, examples, and API documentation together when changing the public API.

Security

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.

API

The public entrypoint exports createGreeting(name?: string): string. It returns a greeting and uses world when the name is omitted.

Packaging

The intentional package allowlist is src/, index.d.ts, README.md, docs/, examples/, specs/, LICENSE, and RELEASE_NOTES.md.

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.

Examples

The runnable example and its prerequisites are indexed in examples/README.md. Start with the basic example, which uses no credentials or external services.

Support

Discord

eliware.org on Discord

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.

License

MIT. See LICENSE.

Links

About

A reusable starting point for Eliware Node.js libraries using native ESM.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages