Natron Transpiler
raw JSON → 0.0.0 verified Fri May 01 auth: no javascript
Natron Transpiler is a JavaScript/TypeScript transpiler currently at version 0.0.0, indicating pre-release stage. It aims to provide minimal overhead and plugin-based architecture. Development cadence is unknown due to no releases or changelog. Key differentiators include a focus on small bundles and extensibility, but it is not yet stable or widely adopted.
Common errors
error Cannot find module 'natron-transpiler' ↓
cause Package not installed or not published to npm registry.
fix
Install package: npm install natron-transpiler
error 'transpile' is not exported from 'natron-transpiler' ↓
cause Using named import when package only exports default.
fix
Use default import: import transpile from 'natron-transpiler';
error Unexpected token: punc (:) ↓
cause Transpiler does not support TypeScript syntax without configuration.
fix
Ensure you pass appropriate options to transpile, e.g., { syntax: 'typescript' }.
Warnings
gotcha Version 0.0.0 is pre-release; API may change without notice. ↓
fix Pin to exact version or use at own risk.
Install
npm install natron-transpiler yarn add natron-transpiler pnpm add natron-transpiler Imports
- transpile wrong
const transpile = require('natron-transpiler').transpile;correctimport { transpile } from 'natron-transpiler'; - NatronTranspiler wrong
import { NatronTranspiler } from 'natron-transpiler';correctimport NatronTranspiler from 'natron-transpiler'; - Config wrong
const { Config } = require('natron-transpiler');correctimport type { Config } from 'natron-transpiler';
Quickstart
import { transpile } from 'natron-transpiler';
const code = 'const x: number = 42;';
const result = transpile(code, { target: 'ES2015' });
console.log(result.code);