create-asciidoc-multi-book-workspace
v0.2.1
Published
Create a complete AsciiDoc multi-book workspace.
Maintainers
Readme
create-asciidoc-multi-book-workspace
create-asciidoc-multi-book-workspace is an npm initializer for a complete AsciiDoc multi-book workspace.
It creates a user-owned workspace with sample books, a catalog, shared assets, explicit AsciiDoc dependencies, and one local build script at tools/adoc-books.mjs.
Usage
pnpm create asciidoc-multi-book-workspace bookshelf
cd bookshelf
pnpm install
pnpm run buildnpm users can run:
npm create asciidoc-multi-book-workspace@latest my-booksnpx create-asciidoc-multi-book-workspace@latest my-booksLibrary API
Host CLIs can create the same workspace through the package entrypoint:
import { initWorkspace } from "create-asciidoc-multi-book-workspace";
const result = await initWorkspace({ targetDir: "my-books", force: false });
console.log(result.targetDir);The host CLI owns command parsing and user-facing output. This package owns the workspace files it creates.
The generated workspace contains:
README.md
catalog.adoc
package.json
.gitignore
tools/adoc-books.mjs
books/00-book-anatomy
books/01-starter-book
books/02-multipart-monograph
books/03-technical-book-workflow
books/04-reference-manual
books/05-upper-volume
books/06-lower-volume
books/07-structured-writing-conventions
shared/attributes.adoc
shared/images/workspace-map.svgIt does not include this repository's test/, .github/, src/, dist/, DESIGN.adoc, or maintainer release checks.
Generated Workspace
The generated package.json directly lists the AsciiDoc toolchain:
@asciidoctor/coreasciidoc-abundant-treeasciidoctor-kroki
The generated scripts are:
pnpm run build
pnpm run check
pnpm run cleantools/adoc-books.mjs belongs to the generated workspace. Users can open it, modify it, or delete it.
Maintainer Layout
src/ # TypeScript initializer and user runtime source
templates/default-workspace/ # true source for the generated user workspace
test/ # maintainer tests
DESIGN.adoc # maintainer design specification
.github/ # maintainer CIThe sample books live only under templates/default-workspace/books/.
Maintainer Commands
pnpm install
pnpm run build
pnpm run preview:build
pnpm run preview:fresh
pnpm run test
pnpm run check
pnpm pack --dry-runpnpm run check builds TypeScript, runs maintainer tests, and checks the npm package boundary.
pnpm run preview:build updates a generated sample workspace under build/template-preview/workspace,
builds the sample books with the maintainer repository's installed AsciiDoc toolchain, and writes HTML to
build/template-preview/workspace/build/html/index.html.
pnpm run preview:fresh recompiles the maintainer runtime and recreates the preview workspace from scratch.
It installs the generated workspace's own dependencies, so use it after changing src/, dependency declarations,
or the initializer contract. Use pnpm run preview:build for normal template edits under templates/default-workspace/.
Releases
Release Please can be run manually to generate candidate release pull requests and CHANGELOG.md updates.
Publishing to npm happens from published GitHub releases. The publish workflow runs pnpm run check before pnpm publish and uses the repository NPM_TOKEN secret.
Version coordinates and release automation state are defined in Versioning Policy.
License
Apache-2.0. See LICENSE.
