Akore is a powerful transpiler maker for JavaScript/TypeScript, currently at version 2.2.0. It provides a robust framework for parsing, analyzing, and transforming code, allowing developers to build custom transpilers with ease. Key differentiators include an extensible architecture with concepts like Schema, Registry, Lexer, and BaseTranspiler, and support for both JavaScript and TypeScript. Release cadence is not specified but appears active with recent updates. It requires Node.js >=16 and npm >=8. Compared to alternatives like Babel or SWC, Akore focuses on simplifying the creation of custom transpiler pipelines rather than being a pre-built transpiler.
npm install akoreNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates creating a Schema, Registry, custom Lexer, and BaseTranspiler to transpile a simple number token.
Switch to ESM imports: use 'import' statements and ensure package.json has 'type': 'module'.
Replace all 'import { Transpiler }' with 'import { BaseTranspiler }'.Use new Schema('identifier', schemaObject) pattern instead of Schema(schemaObject, 'identifier').Always extend Lexer and implement the tokenize method returning an array of tokens.
Use optional chaining: registry.get('key')?.validate(data) or check for undefined.Ensure first argument is a string: new Schema('mySchema', { type: 'string' }).Update to akore ^2.0.0 and use registry.set/get as Map methods.
Change import to: import { BaseTranspiler } from 'akore'.Set 'type': 'module' in package.json or use dynamic import: const akore = await import('akore').