Skip to content

QuatroCode/dts-bundle-proxyjs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dts-bundle-proxyjs

NPM version dependencies Status devDependencies Status

Generate js proxy files from dts-bundle file

Get started

Usage

  1. Install from npm:
$ npm install dts-bundle-proxyjs
  1. Run dts-bundle.

  2. After d.ts file bundled, run dts-bundle-proxyjs.

Features

  • Creates JS proxy from bundled dts.

Usage

$ dts-bundle-proxyjs --help

Examples

Using config: Default config is dts-bundle.js.

$ dts-bundle-proxy -c dts-bundle.json

Config

Example JSON

{
    "name": "example-lib",
    "main": "./dist/index.d.ts",
    "out": "./dist/example-lib.d.ts",
    "removeSource": true,
    "proxyjs": {
      "default": "Hello",
      "generateDir": "./dist",
      "requireFile": "./dist/build.js",
      "exportAsDefault": true
    }
}

Explanation

proxyjs part:

Argument Type Default Description
default string none Parts that must be included.
generateDir * string none Parts that will be generated js files.
requireFile * string none Bundled js file from where proxy will be made.
exportAsDefault bool true Generated js files exported as default.

* - Required.

License

Released under the PGL-3.0 license.