vamtiger-bundle-typescript
Bundle typescript source into a single file.
Last updated 3 months ago by vamtiger-project .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install vamtiger-bundle-typescript 
SYNC missed versions from official npm registry.

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-typescript

Usage

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 inline

The 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 --minify

The 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 --watch

The 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.js

The 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.js

VAMTIGER 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

Current Tags

  • 0.0.36                                ...           latest (3 months ago)

13 Versions

  • 0.0.36                                ...           3 months ago
  • 0.0.35                                ...           3 months ago
  • 0.0.34                                ...           3 months ago
  • 0.0.33                                ...           3 months ago
  • 0.0.32                                ...           3 months ago
  • 0.0.31                                ...           3 months ago
  • 0.0.30                                ...           3 months ago
  • 0.0.27                                ...           10 months ago
  • 0.0.25                                ...           a year ago
  • 0.0.6                                ...           2 years ago
  • 0.0.5                                ...           2 years ago
  • 0.0.4                                ...           2 years ago
  • 0.0.3                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 3
Last Day 0
Last Week 0
Last Month 14
Dev Dependencies (13)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |