Introduction
asimov.js is at its core only two simple things: a command-line interface that loads and executes command scripts in your project and node_modules folder, and a plugin interface for adding initializers and extending the app lifecycle.
On its own, asimov.js doesn’t really do much — it leaves all the heavy lifting to plugins. The two most basic ones are asimov-server and asimov-static. Together you get an awesome static-site generator with extendable, chained processing and a high-performance clustered server, with Express-compatible middleware.
Every app is also a plugin.
That single idea is the keel of the framework. You compose a large application from small pieces, and each piece can be published to npm and reused by anyone else.
What you get
- A CLI that auto-loads commands from
lib/commands/*.js— both yours and your dependencies’. - A plugin system with pre-, vanilla-, and post-initializers.
- Named sequences you can extend, run, or break at any point.
- A small
config()API with constants and JSON-file loading. - POSIX-signal handling for zero-downtime “rolling restarts” and graceful shutdown.
- A public-interface registry so plugins can expose new methods on the global
asimovobject.
Install
npm install -g asimovnpm install --save asimov asimov-staticThen run any command via the CLI:
asimov # short for "asimov start", runs node index.jsasimov start # runs your bootstrapasimov debug # same as start, but with VERBOSE=trueasimov loc # any command file in lib/commands/loc.jsHow to read this guide
The chapters in the sidebar are arranged top-down: the higher chapters teach the building blocks (content, templates, helpers); the lower ones explain how to extend the framework (initializers, plugins, themes). The very last chapter is the public Changelog for the asimov npm package.