Stone.jsDocs
Paradigm

Blueprint & build

The Blueprint

The Blueprint is the whole application described as data: adapters, providers, middleware, routes and your own config, all under dotted stone.* keys. It is assembled once before the first event and then frozen, so the framework only ever reads a settled manifest.

#A keyed store

The Blueprint behaves like a deep, dotted-key store. Reads take a key and a default; writes set a key. During the build phase it is mutable; after, it is read-only.

app/steps.tsts
blueprint.get('stone.name')                       // read
blueprint.get('stone.tasks.pageSize', 20)         // read with a default
blueprint.has('stone.router')                      // presence
blueprint.set('stone.tasks.pageSize', 50)          // write (build phase only)

#The Blueprint API

MethodTypeDescription
get(key, default?)<T>(key, T?) => TRead a value by dotted key, with an optional fallback.
set(key, value)(key, value) => thisWrite a value (during the build phase).
has(key)(key) => booleanWhether a key is present.
add(key, value)(key, value) => thisAppend to an array-valued key (e.g. adapters, middleware).

#Well-known keys

Framework and modules own sub-trees under stone.*; you own your app's namespace. The full list lives in the configuration reference; the common ones:

OptionTypeDescription
stone.namestringThe application name.
stone.adaptersarrayThe stacked adapters (usually written by adapter blueprints).
stone.providersarrayRegistered service providers.
stone.middlewarearrayGlobal middleware.
stone.routerobjectRouter configuration.

Stone.js

Your app exists in every runtime. Until you run it.

An open-source project by Stone Foundation
Created by Mr. Stone (Evens Pierre)