@jymfony/compiler
TypeScript icon, indicating that this package has built-in type declarations

0.4.2 • Public • Published

Compiler

Jymfony JS parser/compiler

Compiles ECMAScript modules down to CommonJS to be interpreted and executed by Node.JS.

NOTE: This package shouldn't be used standalone, but only in conjunction with @jymfony/autoloader. Its API could change without prior notice.

Import/Export

Imports from commonjs modules are supported.
Example:

module.exports = MySimpleFunction;

can be imported as

import MySimpleFunction from './myfile';

Also Node.JS could be imported as ES modules:

import { dirname } from 'fs';

CommonJS exports are supported as well as ES modules.

module.exports = MyClass;

// Is nearly the same as

export default MyClass;

Decorators

ECMAScript decorators are supported.

! TODO support to decorator onto private instance fields/methods is missing.

Resources

Package Sidebar

Install

npm i @jymfony/compiler

Weekly Downloads

4

Version

0.4.2

License

MIT

Unpacked Size

656 kB

Total Files

275

Last publish

Collaborators

  • alekitto