Registry / devops / mahalo-transpiler

mahalo-transpiler

JSON →
library0.6.1jsnpmunverified

A TypeScript-based transpiler for Mahalo applications (v0.6.1). Provides module transpilation with source map generation. Primarily used in development workflows for compiling Mahalo-specific syntax. Alternative to custom build tooling for Mahalo projects. Low release cadence (last update >2 years ago). Requires TypeScript and Node.js.

npm install mahalo-transpiler
INSTALL
IMPORT
SIG · MAHALO-TRANSPILER
M
mahalo-transpiler
devopsjavascriptv0.6.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import mahaloTranspiler from 'mahalo-transpiler'
const mahaloTranspiler = require('mahalo-transpiler')
Package is ESM-only; CommonJS require may not work without bundler.
namespace import
import * as mahaloTranspiler from 'mahalo-transpiler'
import mahaloTranspiler from 'mahalo-transpiler'
The ReadMe uses namespace import; default import may also work depending on TypeScript version.
function transpile
import { transpile } from 'mahalo-transpiler'
const transpile = require('mahalo-transpiler').transpile
Named export transpile available since v0.5.

Transpile a Mahalo module and log the output text.

import * as mahaloTranspiler from 'mahalo-transpiler'; const result: { text: string; map: string } = mahaloTranspiler('./module-name'); console.log(result.text);
Debug
Known issues
breakingPackage no longer supports CommonJS require() starting from v0.6.0.
fix
Use ES module import syntax or upgrade to a bundler that can handle ESM.
affects: >=0.6.0
deprecatedThe function signature changed in v0.5.0: now returns an object with 'text' and 'map' fields instead of a string.
fix
Update code to access result.text and result.map.
affects: <0.5.0
gotchaTypeScript declaration files not bundled; may need to install @types/mahalo-transpiler separately.
fix
Run npm install --save-dev @types/mahalo-transpiler.
affects: >=0.6.0
gotchaTranspiler expects input file paths relative to current working directory; absolute paths may fail.
fix
Use relative paths or path.resolve with process.cwd().
affects: >=0.1.0
Errors
Common errors & fixes
Cannot find module 'mahalo-transpiler'
Package not installed or not in node_modules.
fix
Run npm install --save-dev mahalo-transpiler.
TypeError: mahaloTranspiler is not a function
Using default import instead of namespace import (see ReadMe).
fix
Use import * as mahaloTranspiler from 'mahalo-transpiler'.
SyntaxError: Unexpected token 'export'
Using require() on an ESM-only package.
fix
Switch to import syntax or configure bundler to handle ESM.
Upgrade
Version history
0.6.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
mahalo-transpiler — npm install mahalo-transpiler · libregistry