buildInternoteLibrary

Returns the internote vocabulary composed with every environment registered at call time: the environment nodes, their vocabularies, and the widened scene and cue policies.

@internote/canvas-sdkFunction
On this page
import { buildInternoteLibrary } from '@internote/canvas-sdk';

Call time, not module load, is the point: register the environments a compile should accept, then build. What a host that runs the language's compiler itself, in a browser say, hands the compiler as its library; the compile service on the compile entry builds it the same way. With nothing registered the result is the base vocabulary alone, and a document using an environment fails to compile naming the unknown node.

#Signature

(): ChalkLibrary

#Example

registerEnvironment(greetingSpec);
const library = buildInternoteLibrary();
const result = compile(source, library, { class: 'internote' });

Declared in packages/canvas-sdk/src/environment/internote-library.ts:40.

Last updated