Registry / devops / tspackage

tspackage

JSON →
library1.0.0-beta.4jsnpmunverified

TsPackage is a TypeScript minifier and modular bundle optimizer that compiles ES6 external TypeScript modules into minified single-file bundles. Version 1.0.0-beta.4 supports TypeScript 2.x and offers identifier shortening, whitespace removal, and cache-optimized incremental builds. It differentiates by bundling dependencies at compilation time rather than relying on downstream build tools like AMD Optimizer. Currently a work in progress, it replaces TsProject. Typically low release cadence as beta.

npm install tspackage
INSTALL
IMPORT
SIG · TSPACKAGE
T
tspackage
devopsjavascriptv1.0.0-beta.4
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.

tspackage
import tspackage from 'tspackage'
const tspackage = require('tspackage')
Default import; no named exports. Requires ESM.
BuildResult
import type { BuildResult } from 'tspackage'
import { BuildResult } from 'tspackage'
Type-only import to avoid runtime inclusion. Not a value.
tspackage.build
tspackage.build(configPath, settings, callback)
build(configPath, settings, callback)
build is a method on the default export, not a named export.

Demonstrates basic usage of tspackage.build with a tsconfig path and callback.

import tspackage from 'tspackage'; const configPath = './tsconfig.json'; const settings = {}; tspackage.build(configPath, settings, (result) => { if (!result.Succeeded()) { console.error('Build failed:', result.Errors()); } else { console.log('Build succeeded!'); } });
Debug
Known issues
deprecatedTsPackage is a work-in-progress replacement for TsProject; continue using TsProject for now.
fix
Use TsProject until TsPackage reaches stable release.
affects: >=1.0.0-beta.0
breakingTsPackage 1.0.0 supports TypeScript 2.x only.
fix
Use TypeScript 2.x for compatibility.
affects: >=1.0.0
gotchaThe API uses a callback pattern and does not return a Promise.
fix
Wrap in a Promise manually or use a callback-based flow.
affects: >=1.0.0-beta.0
Errors
Common errors & fixes
TypeError: tspackage.build is not a function
Using named import { build } instead of default import.
fix
import tspackage from 'tspackage'; then tspackage.build(...)
error TS2307: Cannot find module 'tspackage'
Missing tspackage dependency or incorrect import path.
fix
Run `npm install tspackage` and ensure import is './tspackage' if local.
Error: Cannot read property 'Succeeded' of undefined
Callback result might be undefined if build fails early.
fix
Check that configPath is correct and tsconfig.json exists.
Upgrade
Version history
1.0.0-beta.4latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
tspackage — npm install tspackage · libregistry