0.0.3 • Published 4 years ago
create-stack-info v0.0.3
stack-info
returns a schema for an application stack. Used by NoStack.
What
A tool for specifying a schema for the data needs of an application. Exports a schema type. Useful for templates for NoStack applications, and for some templates that provide front end code for showing or using dynamic data.
WARNING: still under construction.
Usage
First, install the package:
npm i stack-infoHere is a sample usage:
const stack-info = require('stack-info')API
async function stackInfo: Schema (settings: NsInfo, config: Configuration)- The
settingsparameter is aNsInfoas exposed in magicalstrings. It is the settings for a given code base generated by a template. - The configuration is a
Configurationtype from cogs-box. The template has the configuration, which specifies what is necessary for the settings.
The output is a Schema type. Following are the keys for a Schema:
topSource: string;
userClasses: UserClasses;
sources: Sources;
types: Types;
actions: ActionsByActionType;
backend?: BackendData;
context?: ContextSupport;For more details, check out the interface in the code.