1.59.0 • Published 6 months ago

@totemorg/skin v1.59.0

Weekly downloads
-
License
ISC
Repository
github
Last release
6 months ago

SKIN

The SKIN TOTEM plugin provides:

/DATASET.TYPE ? QUERY
/AREA/FILE ? QUERY
/AREA/STORE ? QUERY
/AREA/GRAPH ? QUERY
/AREA/ ? QUERY

endpoints to render datasets, folders, graphs and client-side markdown where the optional TYPE:

view | help

specifies the rendering mode.

Manage

npm install @totemstan/skin		# Install
npm run start [ ? | $ | ...]	# Unit test
npm run verminor				# Roll minor version
npm run vermajor				# Roll major version
npm run redoc					# Regen documentation

Usage

Acquire and optionally configure SKIN:

const SKIN = require("skin").config({
	key: value, 						// set key
	"key.key": value, 					// indexed set
	"key.key.": value					// indexed append
});

where configuration keys follow ENUMS deep copy conventions.

Program Reference

SKIN

Provides an endpoint to render DEBE notebooks, datasets, and engines using the (possibly dynamically generated) jade associated with the requested notebook/table/engine. Converts TOTEM markdown to html. This module documented in accordance with jsdoc.

Env Vars:

	URL_REPO = URL to code repo

Requires: module:enums, module:fs, module:cluster, module:jade@1.9.0
Author: ACMESDS

SKIN.areaRouters

Kind: static constant of SKIN

SKIN.typeRouters

Kind: static constant of SKIN

SKIN.lookups

Kind: static constant of SKIN

SKIN.blogCtx

Blogging context.

Kind: static constant of SKIN

SKIN.skinCtx

Kind: static constant of SKIN

SKIN.renderSkin(req, res)

Endpoint to render req.table using associated jade engine.

Kind: static method of SKIN

ParamTypeDescription
reqObjectTotem request
resfunctionTotem response

SKIN.skinContext(req, cb)

Callback cb with skinning context ctx for requested table.

Kind: static method of SKIN

ParamTypeDescription
reqObjectTotem request
cbfunctioncallback(ctx)

SKIN.renderJade(jade, ctx, cb)

Render jade string to callback cb( err || html ) in a new context created for this request.

Kind: static method of SKIN

ParamTypeDescription
jadeStringcontents to render
ctxObjectskinning context
cbfunctioncallback(ctx)

SKIN~sqls

Kind: inner constant of SKIN

SKIN~errors

Kind: inner constant of SKIN

SKIN~blog(ctx, src, rec, cb)

Converts markdown to html:

	$VIEW{ SRC ? w=WIDTH & h=HEIGHT & x=KEY$INDEX & y=KEY$INDEX ... }  
	$embed{ QUERY }  
	${ KEY }   
	[ LINK || WIDTH,HEIGHT ] ( URL )  
	$$ inline TeX $$  
	n$$ newline TeX $$  
	a$$ AsciiMath $$  
	m$$ MathML $$  
	TeX := TeX || #VAR || VAR#KEY#KEY...  
	# SECTION  
	| GRID | GRID | ...  
	ESCAPE || $with || $for || $if:  
		CODE

Kind: inner method of SKIN

ParamTypeDescription
ctxObjectinitial blogging context
srcStringdefault source path
recObjectsource record
cbfunctioncallback accepting the resulting html

Contacting, Contributing, Following

Feel free to

License

MIT


© 2012 ACMESDS

1.57.0

6 months ago

1.56.0

6 months ago

1.59.0

6 months ago

1.58.0

6 months ago

1.48.0

7 months ago

1.49.0

7 months ago

1.51.0

6 months ago

1.50.0

6 months ago

1.53.0

6 months ago

1.52.0

6 months ago

1.55.0

6 months ago

1.54.0

6 months ago

1.44.0

1 year ago

1.43.0

1 year ago

1.46.0

12 months ago

1.45.0

1 year ago

1.47.0

12 months ago

1.40.0

1 year ago

1.42.0

1 year ago

1.41.0

1 year ago

1.36.0

1 year ago

1.34.0

1 year ago

1.35.0

1 year ago

1.38.0

1 year ago

1.39.0

1 year ago

1.32.0

1 year ago

1.33.0

1 year ago

1.31.0

1 year ago

1.30.0

1 year ago

1.29.0

1 year ago

1.27.0

2 years ago

1.26.0

2 years ago

1.25.0

2 years ago

1.24.0

2 years ago

1.23.0

2 years ago

1.22.0

2 years ago

1.21.0

2 years ago

1.17.0

2 years ago