• Getting Started
  • Installation
  • Configuration
  • Usage
  • API Reference
  • Changelog
  • FAQ
  • Crumbs
  • Documentation

Getting Started

Welcome to the Acme documentation. This guide will walk you through everything you need to know to get up and running quickly.

Looking for the API reference? Jump straight to the API Reference section.

Installation

Acme is available via npm. Node.js 24 or later is required.

Via npm

Install the package into your project:

npm install acme

Via CDN

For quick prototyping you can load Acme directly from a CDN:

<script src="https://cdn.example.com/acme@latest/dist/acme.js"></script>
Production use
CDN links are convenient for prototyping but not recommended for production. Pin a specific version to avoid unexpected breakage.

Configuration

Create an acme.config.js file in your project root. All options are optional — Acme works out of the box with sensible defaults.

export default {
  output: 'dist/',
  minify: true,
  sourcemaps: false,
  plugins: [],
};

Configuration options

Option Type Default Description
output string 'dist/' Directory for build output
minify boolean true Minify output in production builds
sourcemaps boolean false Generate source maps
plugins array [] List of plugins to load

Usage

Basic example

Import Acme and call build() to compile your project:

import acme from 'acme';

const result = await acme.build({
  entry: 'src/index.js',
  output: 'dist/',
});

console.log(`Built ${result.files.length} files`);

CLI

Acme also ships a CLI for use in npm scripts or CI pipelines:

# Build once
npx acme build

# Watch mode
npx acme build --watch

Notes

  • Entry files must be valid ES modules
  • Output paths are relative to the project root
  • Use Ctrl+C to stop watch mode
Keep your entry points small. Let the bundler do the tree-shaking rather than manually managing imports. Acme Best Practices Guide

API Reference

acme.build(options)

Compiles your project and writes output to disk.

Returns a Promise<BuildResult>.

Parameters

Parameter Type Required Description
entry string Required Path to the entry file
output string Optional Output directory (overrides config)
minify boolean Optional Override minification for this build

acme.watch(options)

Starts a file watcher and rebuilds on changes.

const watcher = await acme.watch({ entry: 'src/index.js' });

for await (const event of watcher) {
  console.log('Rebuilt after change in ' + event.file);
}

// Stop watching
await watcher.close();

Changelog

v2.0.0 Latest

  • Rewritten core pipeline for 40% faster builds
  • New plugin API — see API Reference
  • Node.js 24 required

v1.1.0

  • Added watch() API
  • Improved error messages with source locations
  • Fixed sourcemap generation on Windows

v1.0.0 Stable

  • Initial release

FAQ

How do I install Acme?

Install via npm: npm install acme. Node.js 24 or later is required. See the Installation section for CDN and other options.

How do I update to a new version?

Run npm update acme to update to the latest compatible version, or pin a specific version in your package.json and run npm install.

Does Acme work with TypeScript?

Yes. Acme ships TypeScript declaration files and works out of the box with TypeScript projects. No additional configuration is required.

Can I use Acme in a monorepo?

Yes. Acme works in any Node.js project structure. Install it at the workspace or package level depending on your needs. The output config option lets you write build artifacts anywhere on the filesystem.

Where do I report bugs?

Open an issue on the project repository. Please include your Acme version, Node.js version, operating system, and a minimal reproduction case.