alins-compiler-node
v0.0.36
Published
All-in-js Web UI Framework, No jsx/template/vdom/css/html
Downloads
10
Maintainers
Readme
🚀 Alins: The most pure and elegant WebUI framework
中文 | Documentation | Playground | Update Log | Feedback Errors/Defects | Gitee | Message Board
alins-compiler-node
alins-compiler-node is the alins compiler in the nodejs environment. All the above plug-ins encapsulate the compilation functions implemented by this tool. They are used as follows:
const {parseAlins} = require('alins-compiler-node');
const code = 'let a=1; a++;';
const result = parseAlins(code);
The parseAlins method is an optional configuration item with three optional attributes:
- ts: Whether to support typescript compilation, the default is false
- importType: the way to introduce alins, optional values are esm, cjs, iife. The default value is esm, which means using the import statement to introduce alins
- filename: current code module file name, automatically generated by default
const {parseAlins} = require('alins-compiler-node');
const code = 'let a=1; a++;';
const result = parseAlins(code, {
ts: false,
importType: 'esm',
filename: 'test.tsx',
});