create-apis
v0.1.0
Published
CLI tool for scaffolding Apis.js projects
Maintainers
Readme
create-apis
CLI tool for scaffolding new Apis.js projects, with one
structural difference: templates are bundled locally and copied with
fs-extra instead of fetched from a separate GitHub repo per template —
there's no published apisjs-template repo (yet), so this keeps the tool
fully working today rather than pointing at a 404.
Usage
npx create-apis my-appor install globally:
npm install -g create-apis
apis-app my-appBoth prompt for an app name (if not given as an argument) and a starter
template, copy the template, then run npm install inside the new directory.
Known limitation
The bundled default template's package.json depends on apisjs as a
normal npm dependency ("apisjs": "^0.0.1"), matching what it should be once
the framework is published. Until then, the "Installing dependencies" step
will fail with a 404 for apisjs — the scaffold itself (files, structure,
package.json renamed to your app name) still completes correctly, you'll
just need to either publish apisjs first or manually point the dependency
at a local file: path to the apis.js checkout for local testing.
Structure
src/
apis-app.js entry point (bundled to bin/apis-app via esbuild)
banner.js CLI banner
prompts.js name/template prompts
files.js template copy + npm install
spinner.js progress indicator
templates.json list of available templates
templates/
default/ bundled starter (Rollup + a single .xht component)Build
npm install
npm run build # -> bin/apis-app