0.0.36 • Published 6 years ago
vamtiger-bundle-typescript v0.0.36
VAMTIGER Bundle Typescript
VAMTIGER Bundle Typescript bundles typescript into a single compiled output file.
Installation
VAMTIGER Bundle Typescript can be installed using npm or yarn:
npm i --global vamtiger-bundle-typescript or
yarn global vamtiger-bundle-typescriptUsage
VAMTIGER Bundle Typescript can bundle typescript to a single compiled output file:
vamtiger-bundle-typescript --entryFilePath source/index.ts --bundleFilePath build/bundle.js --format cjs --sourcemap inlineThe compiled result can also be minified by specifying the minify option:
vamtiger-bundle-typescript --entryFilePath source/index.ts --bundleFilePath build/bundle.js --format cjs --sourcemap inline --minifyThe watch option can be added to generate compiled output each time a source file is updated:
vamtiger-bundle-typescript --entryFilePath source/index.ts --bundleFilePath build/bundle.js --format cjs --sourcemap inline --watchThe copyBundleFilePath option will copy the compiled output to a defined path:
vamtiger-bundle-typescript --entryFilePath source/index.ts --bundleFilePath build/bundle.js --format cjs --sourcemap inline --copyBundleFilePath ${PWD}/some/bundle-copy.jsThe relativePath option can be used to reference entryFilePath and bundleFilePath relative to the current working directory:
vamtiger-bundle-typescript --relativePath --entryFilePath source/index.ts --bundleFilePath build/bundle.js --format cjs --sourcemap inline --copyBundleFilePath ${PWD}/some/bundle-copy.jsVAMTIGER Bundle Typescript can also be defined as a custom script:
...
scripts: {
"bundle": "vamtiger-bundle-typescript --relativePath --entryFilePath source/index.ts --bundleFilePath build/bundle.js --format iife --sourcemap inline --minify",
"watch": "vamtiger-bundle-typescript --relativePath --entryFilePath source/index.ts --bundleFilePath build/bundle.js --format iife --sourcemap inline --minify --watch"
}
...Output formats of the compiled result include:
- umd
- amd
- system
- cjs
- iife
Sourcemap can be set to:
- inline
- true
- false