Registry / devops / mistc
library2.1.3jsnpmunverified

mistc is a compiler for Mist templates, a UI templating language. Version 2.1.3 ships TypeScript declarations and provides both a CLI tool and a programmatic API. It supports minification, binary compilation, platform targeting, and various TSX optimization options. The package is stable with a moderate release cadence. Key differentiators include first-class Mist template support, TSX-like options, and an integrated CLI for building.

npm install mistc
INSTALL
IMPORT
SIG · MISTC
M
mistc
devopsjavascriptv2.1.3
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.

compile
import { compile } from 'mistc'
import compile from 'mistc'
compile is a named export, not default. TypeScript users should use named import.
CompileOptions
import type { CompileOptions } from 'mistc'
import { CompileOptions } from 'mistc'
CompileOptions is a type, use type import to avoid runtime overhead.
CLI
import { CLI } from 'mistc'
const CLI = require('mistc').CLI
CLI is a named export. CJS require is possible but not idiomatic; prefer ESM.

Demonstrates using the compile API with minification and tsxOptions, plus CLI shorthand.

import { compile } from 'mistc'; async function build() { const result = await compile('/path/to/template.mist', { minify: true, tsxOptions: { removeConsoleLog: false, symbolNameOptimization: true, shortStyleKeyOptimization: false } }); console.log('Compiled output:', result); } build().catch(console.error); // CLI equivalent: // mistc -o output.js --minify template.mist
Debug
Known issues
gotchaThe CLI tool globally installs via `npm install -g mistc`. If you have a local install, the global command may conflict or run a different version.
fix
Use npx mistc or a script in package.json to ensure local version.
affects: >=2.0
deprecatedThe `--check-update` option returns a JSON string with version info; this may be removed in future versions. Rely on npm check-update tools instead.
fix
Use `npm outdated -g mistc` or similar.
affects: >=2.1
gotchaThe compile function expects an absolute or relative file path, not a file URL (e.g., file://).
fix
Use a valid filesystem path string.
affects: >=2.0
Errors
Common errors & fixes
Cannot find module 'mistc'
Package not installed in current directory or global path not set.
fix
Run `npm install mistc` locally, or `npm install -g mistc` for global CLI.
compile is not a function
Default import when named export is required.
fix
Use `import { compile } from 'mistc'` instead of `import compile from 'mistc'`.
SyntaxError: Unexpected token 'export'
Using ESM syntax in a CommonJS environment without transpilation.
fix
Add `"type": "module"` to package.json or use .mjs extension.
Upgrade
Version history
2.1.3latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
packagemistc
mistc — npm install mistc · libregistry