0.0.2-dev • Published 5 years ago
@candlefw/ts v0.0.2-dev
BRIEF
TODO - FILL THIS IN!
import {JSNodeClass} from "@candlefw/js";
import {TSNode, FullTSTreeNode} from "./types/node.js";
import {TSTreeNodeDefinition} from "./types/node_definition.js";
import {
renderCompressed,
renderWithFormatting,
renderWithSourceMap,
renderWithFormattingAndSourceMap
} from "./render/render.js";
import {TSNodeType, TSNodeClass} from "./types/node_type.js";
import {
expression_parser,
typescript_parser,
statement_parser
} from "./parser/parse.js";
import env,{TSParserEnv} from "./parser/env.js";
import {TSNodeTypeLU} from "./types/node_type_lu.js";
const global_object= (typeof global!=="undefined")?global:window;
if ( global_object ) {
const
cfw_js_data= {
parse:{
script:typescript_parser,
statement:statement_parser,
expression:expression_parser
},
render:{
compressed:renderCompressed,
withFormatting:renderWithFormatting,
withSourceMap:renderWithSourceMap,
withFormattingAndSourceMap:renderWithFormattingAndSourceMap
}
};
if ( typeof global_object.cfw=="undefined" ) {global_object.cfw = {js:cfw_js_data};}else Object.assign(global_object.cfw, {js:cfw_js_data});
}
export * from "./render/rules.js";
export * from "./render/render.js";
export {
TSParserEnv,
TSNodeClass,
TSNodeType,
TSTreeNodeDefinition,
TSNode,
TSNodeTypeLU,
env as TSParserEnvironment,
typescript_parser as parser,
expression_parser as exp,
statement_parser as stmt
};
INSTALL
npm
$ npm install --save @candlefw/ts
yarn
$ yarn add @candlefw/ts
DOCS
CFW DEPENDENCIES
As a part of CandleFW, cfw.ts relies on the following libraries to make the magic happen. The modular design of CFW allows each on to be used independently for specific project needs. Give them a look to find out more.