alins-compiler-node
TypeScript icon, indicating that this package has built-in type declarations

0.0.36 • Public • Published

stars forks version downloads jsdelivr visitors

author license Size TopLang issue Dependent

🚀 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:

  1. ts: Whether to support typescript compilation, the default is false
  2. 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
  3. 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',
});

Package Sidebar

Install

npm i alins-compiler-node

Weekly Downloads

1

Version

0.0.36

License

MIT

Unpacked Size

7.07 kB

Total Files

6

Last publish

Collaborators

  • theajack