Registry / devops / lunet-transpiler

lunet-transpiler

JSON →
library0.0.8jsnpmunverified

The Lunet Transpiler is a build tool for the Lunet web frontend library (version 0.0.8, pre-release). It transpiles Lunet components or templates into standard JavaScript/HTML/CSS for browser consumption. Key differentiator: designed specifically for the Lunet ecosystem, offering custom syntax and optimizations not available in general-purpose transpilers like Babel. Release cadence is unstable as it is still in early development; breaking changes are expected between minor versions. Not suitable for production use yet.

npm install lunet-transpiler
INSTALL
IMPORT
SIG · LUNET-TRANSPILER
L
lunet-transpiler
devopsjavascriptv0.0.8
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.

transpile
import { transpile } from 'lunet-transpiler'
const transpile = require('lunet-transpiler')
ESM-only; no CommonJS support.
compile
import { compile } from 'lunet-transpiler'
Named export for compiling full components.
default
import transpiler from 'lunet-transpiler'
import * as transpiler from 'lunet-transpiler'
Default export is the main transpiler function; namespace import imports an empty object.

Transpiles a simple Lunet component template into JavaScript code, demonstrating basic usage of the transpile function.

import { transpile } from 'lunet-transpiler'; const input = ` <template> <div>{message}</div> </template> <script> export default { data() { return { message: 'Hello, Lunet!' }; } } </script>`; const output = transpile(input, { module: true, sourceMap: false }); console.log(output.code);
lunet --version
Debug
Known issues
breakingAPI may change without notice in pre-1.0 versions
fix
Pin to a specific version and monitor changelog.
affects: >=0.0.1 <1.0.0
gotchaMissing dependency 'lunet' at runtime if not using bundled output
fix
Ensure 'lunet' core library is installed as a peer dependency.
affects: *
Errors
Common errors & fixes
Error: Cannot find module 'lunet'
lunet-transpiler requires lunet core to be installed.
fix
npm install lunet
TypeError: transpile is not a function
Incorrect import: default vs named export.
fix
Use import { transpile } from 'lunet-transpiler'
Upgrade
Version history
0.0.8latest on npm
Audit
Dependencies

No dependency data recorded yet.

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