ts-builder
Module to simplify rollup typescript applications by providing single `tsbuid.json` file with all configurations.
Last updated 5 months ago by goriunovd .
ISC · Original npm · Tarball · package.json
$ cnpm install ts-builder 
SYNC missed versions from official npm registry.

TS Builder

Module to simplify rollup typescript applications by providing single tsbuid.json file with all configurations.

Installation

Run:

npm -i ts-builder

Cinfig build

Add to your package.json scripts:

"build": "ts-builder -c ./tsbuild.json"

Create tsbuid.json file in you project.

Available Configurations:

{
    // src folder where is all and main ts file placed
    "src": "./src/",
    // main file which is a start point of build
    "main": "index.ts",
    // you can provide tslint if you would like to use it
    "tslint": "./tslint.json",
    // distination folder
    "distFolder": "./dist/",
    // rollup output configs
    "output": {
        // roll up formats iife, cjs, umd check roll up for more info
        "format": "cjs",
        // output file
        "file": "index.js",
        // app name not really used for anything right now
        "name": "My Name app"
    },
    // uglify check rollup-plugin-terser or uglify configs
    "uglify": {
        "mangle": true,
        "output": {
            "beautify": true
        }
    },
    // external moduels which are used in app
    "external": [
        "http",
        "https",
        "crypto"
    ],
    // check Tyscript configs for more info
     "tsConfigs": {
        "compilerOptions": {
            "target": "es6",
            "module": "ES2015",
            "removeComments": true,
            "moduleResolution": "node",
            // if you enable declaration it will be built in dist folder and bind together
            "declaration": true,
            // if you dont provide declarationDir types dir will be ./node_modules/ts-builde/types/
            "declarationDir": "./src/"
        },
        "files": [
            "./node_modules/@types/node/index.d.ts"
        ],
        "exclude": [
            "./src/**/*.test.ts"
        ],
        "include": [
            "./src/**/*"
        ]
    },

    // copy any assets to the dist folder
    "copy": [
        {   // from 
            "src": "./LICENSE",
            // to
            "dist": "./dist/LICENSE"
        },
        {
            "src": "./.github/README.md",
            "dist": "./dist/README.md"
        },
        {
            "src": "./package.json",
            "dist": "./dist/package.json",
            // remove method works only for json files (you can remove any property)
            // works only on root level (will be nchaged in future)
            "remove": [
                "devDependencies",
                "scripts"
            ]
        }
    ]

    // if you would like to run multiple builds with different configs use this:
    // each item in array will be merged with globral configs and ovewrite it 
    "builds": [
        {
            // all same configs as above
            "src": "./app1/"
            "output": {
                "format": "cjs",
                "file": "hello.js",
                "name": "My Name app"
            }
        },
        {
            // all same configs as above
            "src": "./app2/"
            "output": {
                "format": "cjs",
                "file": "play.js",
                "name": "My Name app"
            }
        }
    ]

}

Current Tags

  • 0.10.0                                ...           latest (5 months ago)

145 Versions

  • 0.10.0                                ...           5 months ago
  • 0.9.2                                ...           6 months ago
  • 0.9.1                                ...           6 months ago
  • 0.9.0                                ...           8 months ago
  • 0.8.0                                ...           a year ago
  • 0.7.4                                ...           a year ago
  • 0.7.3                                ...           a year ago
  • 0.7.2                                ...           a year ago
  • 0.7.1                                ...           a year ago
  • 0.7.0                                ...           a year ago
  • 0.6.17                                ...           a year ago
  • 0.6.16                                ...           a year ago
  • 0.6.15                                ...           a year ago
  • 0.6.14                                ...           a year ago
  • 0.6.13                                ...           a year ago
  • 0.6.12                                ...           a year ago
  • 0.6.11                                ...           a year ago
  • 0.6.10                                ...           a year ago
  • 0.6.9                                ...           a year ago
  • 0.6.8                                ...           2 years ago
  • 0.6.7                                ...           2 years ago
  • 0.6.6                                ...           2 years ago
  • 0.6.5                                ...           2 years ago
  • 0.6.4                                ...           2 years ago
  • 0.6.3                                ...           2 years ago
  • 0.6.2                                ...           2 years ago
  • 0.6.1                                ...           2 years ago
  • 0.6.0                                ...           2 years ago
  • 0.5.25                                ...           2 years ago
  • 0.5.24                                ...           2 years ago
  • 0.5.23                                ...           2 years ago
  • 0.5.22                                ...           2 years ago
  • 0.5.21                                ...           2 years ago
  • 0.5.20                                ...           2 years ago
  • 0.5.19                                ...           2 years ago
  • 0.5.18                                ...           2 years ago
  • 0.5.17                                ...           2 years ago
  • 0.5.16                                ...           2 years ago
  • 0.5.15                                ...           2 years ago
  • 0.5.14                                ...           2 years ago
  • 0.5.13                                ...           2 years ago
  • 0.5.12                                ...           2 years ago
  • 0.5.11                                ...           2 years ago
  • 0.5.10                                ...           2 years ago
  • 0.5.9                                ...           2 years ago
  • 0.5.8                                ...           2 years ago
  • 0.5.7                                ...           2 years ago
  • 0.5.6                                ...           2 years ago
  • 0.5.5                                ...           2 years ago
  • 0.5.4                                ...           2 years ago
  • 0.5.3                                ...           2 years ago
  • 0.5.2                                ...           2 years ago
  • 0.5.1                                ...           2 years ago
  • 0.5.0                                ...           2 years ago
  • 0.4.1                                ...           2 years ago
  • 0.4.0                                ...           2 years ago
  • 0.3.3                                ...           2 years ago
  • 0.3.2                                ...           2 years ago
  • 0.3.1                                ...           2 years ago
  • 0.3.0                                ...           2 years ago
  • 0.2.48                                ...           2 years ago
  • 0.2.47                                ...           2 years ago
  • 0.2.46                                ...           2 years ago
  • 0.2.45                                ...           2 years ago
  • 0.2.44                                ...           2 years ago
  • 0.2.43                                ...           2 years ago
  • 0.2.42                                ...           2 years ago
  • 0.2.41                                ...           2 years ago
  • 0.2.40                                ...           2 years ago
  • 0.2.20                                ...           2 years ago
  • 0.2.19                                ...           2 years ago
  • 0.2.18                                ...           2 years ago
  • 0.2.17                                ...           2 years ago
  • 0.2.16                                ...           2 years ago
  • 0.2.15                                ...           2 years ago
  • 0.2.14                                ...           2 years ago
  • 0.2.13                                ...           2 years ago
  • 0.2.12                                ...           2 years ago
  • 0.2.11                                ...           2 years ago
  • 0.2.10                                ...           2 years ago
  • 0.2.9                                ...           2 years ago
  • 0.2.8                                ...           2 years ago
  • 0.2.7                                ...           2 years ago
  • 0.2.6                                ...           2 years ago
  • 0.2.5                                ...           2 years ago
  • 0.2.4                                ...           2 years ago
  • 0.2.3                                ...           2 years ago
  • 0.2.2                                ...           2 years ago
  • 0.2.1                                ...           2 years ago
  • 0.2.0                                ...           2 years ago
  • 0.1.20                                ...           2 years ago
  • 0.1.19                                ...           2 years ago
  • 0.1.18                                ...           2 years ago
  • 0.1.17                                ...           2 years ago
  • 0.1.16                                ...           2 years ago
  • 0.1.15                                ...           2 years ago
  • 0.1.14                                ...           2 years ago
  • 0.1.13                                ...           2 years ago
  • 0.1.12                                ...           2 years ago
  • 0.1.11                                ...           2 years ago
  • 0.1.10                                ...           2 years ago
  • 0.1.9                                ...           2 years ago
  • 0.1.8                                ...           2 years ago
  • 0.1.7                                ...           2 years ago
  • 0.1.6                                ...           2 years ago
  • 0.1.5                                ...           2 years ago
  • 0.1.4                                ...           2 years ago
  • 0.1.3                                ...           2 years ago
  • 0.1.2                                ...           2 years ago
  • 0.1.1                                ...           2 years ago
  • 0.1.0                                ...           2 years ago
  • 0.0.34                                ...           2 years ago
  • 0.0.33                                ...           2 years ago
  • 0.0.32                                ...           2 years ago
  • 0.0.31                                ...           2 years ago
  • 0.0.30                                ...           2 years ago
  • 0.0.29                                ...           2 years ago
  • 0.0.28                                ...           2 years ago
  • 0.0.27                                ...           2 years ago
  • 0.0.26                                ...           2 years ago
  • 0.0.25                                ...           2 years ago
  • 0.0.24                                ...           2 years ago
  • 0.0.23                                ...           2 years ago
  • 0.0.22                                ...           2 years ago
  • 0.0.21                                ...           2 years ago
  • 0.0.20                                ...           2 years ago
  • 0.0.19                                ...           2 years ago
  • 0.0.18                                ...           2 years ago
  • 0.0.17                                ...           2 years ago
  • 0.0.16                                ...           2 years ago
  • 0.0.15                                ...           2 years ago
  • 0.0.14                                ...           2 years ago
  • 0.0.13                                ...           2 years ago
  • 0.0.12                                ...           2 years ago
  • 0.0.11                                ...           2 years ago
  • 0.0.10                                ...           2 years ago
  • 0.0.9                                ...           2 years ago
  • 0.0.8                                ...           2 years ago
  • 0.0.7                                ...           2 years 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
  • 0.0.2                                ...           2 years ago
  • 0.0.1                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 147
Last Day 0
Last Week 0
Last Month 148
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |