Registry / web-framework / tscraft

tscraft

JSON →
library0.0.1jsnpmunverified

A TypeScript transpiler and bundler with minimal dependencies. Currently at version 0.0.1 with slow release cadence. Targets Node >=8.5.0. Differentiates itself as a lightweight alternative to larger build tools like webpack or rollup, though still in early development with no documentation or community adoption.

npm install tscraft
INSTALL
IMPORT
SIG · TSCRAFT
T
tscraft
web-frameworkjavascriptv0.0.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 tscraft from 'tscraft'
const tscraft = require('tscraft')
ESM-only; no CommonJS support. Version 0.0.1 exports a default function.
transpile
import { transpile } from 'tscraft'
const { transpile } = require('tscraft')
Named export available only in ESM.
bundle
import { bundle } from 'tscraft'
const { bundle } = require('tscraft')
Named export, requires ESM.

Shows transpile and bundle usage with type annotations.

import tscraft from 'tscraft'; import { transpile, bundle } from 'tscraft'; const code = `const x: number = 1;`; // Transpile TypeScript to JavaScript const result = transpile(code, { target: 'es2015' }); console.log(result.code); // Bundle multiple files const bundleResult = bundle({ entry: 'src/index.ts', output: 'dist/bundle.js' }); console.log(bundleResult); // Use default export (same as transpile) const defaultResult = tscraft(code, { target: 'es2020' });
tscraft --version
Debug
Known issues
breakingNo CommonJS (require) support; all imports must be ESM.
fix
Use ESM imports with 'import' syntax and ensure your project is configured for ESM (type: 'module' in package.json).
affects: >=0.0.1
deprecatedDefault export may be renamed in future versions; use named exports for stability.
fix
Prefer import { transpile } from 'tscraft' over import tscraft from 'tscraft'.
affects: >=0.0.1
gotchaEngine requirement Node >=8.5.0 may cause issues on older systems.
fix
Upgrade Node.js to version 8.5.0 or later.
affects: >=0.0.1
Errors
Common errors & fixes
Cannot find module 'tscraft'
Package not installed or ESM import used in CJS context.
fix
Run 'npm install tscraft' and ensure project is ESM-enabled (type: 'module' in package.json).
SyntaxError: Unexpected token 'export'
Attempting to use ESM 'import' in a CommonJS file without ESM support.
fix
Add 'type': 'module' to package.json or rename file to .mjs.
TypeError: tscraft is not a function
Using default import incorrectly; default export may be an object.
fix
Use named imports: import { transpile } from 'tscraft'.
Upgrade
Version history
0.0.1latest on npm
Audit
Dependencies
@tscraft/parserrequiredCore TypeScript parsing dependency
magic-stringoptionalUsed for source map manipulation
Agent activity
4 hits · last 30 days
node
4
Resources
tscraft — npm install tscraft · libregistry