create-stack-info
v0.0.3
Published
returns a schema for a stack as needed by no-stack
Downloads
5
Readme
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-info
Here is a sample usage:
const stack-info = require('stack-info')
API
async function stackInfo: Schema (settings: NsInfo, config: Configuration)
- The
settings
parameter is aNsInfo
as exposed in magicalstrings. It is the settings for a given code base generated by a template. - The configuration is a
Configuration
type 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.