npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

This package has been deprecated

Author message:

use TypeScript 2.0 and include/exclude options :)

tsconfig-cli

2.1.0 • Public • Published

tsconfig-cli

Build Status npm version

A CLI of https://github.com/TypeStrong/tsconfig

Install

npm i --save-dev tsconfig-cli

Usage

# update tsconfig.json (overwrite)
> tsconfig -u

# Output to stdout
> tsconfig src/tsconfig.json
{
  "compilerOptions": {
    "target": "es5",
    "noImplicitAny": true,
    "removeComments": true,
    "outDir": "dist"
  },
  "filesGlob": [
    "src/**/*.ts",
    "!ignored/**/*.ts"
  ],
  "files": [
    "src/foo.ts"
  ]
}

Important: JSON With Comments

tsconfig-cli allows comments (this is a feature planned in typescript 1.8), but updated json has no comments. tsconfig-cli updates always tsconfig.json. So If you want to use json comments, you should rename the file.

Sample

misc/tsconfig.commented.json

{
  "compilerOptions": {
    "target": "es5",
    "noImplicitAny": true,
    "removeComments": true,
    "outDir": "dist"
  },
  "filesGlob": [
    "src/**/*.ts",
    "!ignored/**/*.ts"
  ],
  /* GENERATED: DON'T EDIT*/
  "files": [
  ]
}

update json

tsconfig misc/tsconfig.commented.json -u # this update misc/tsconfig.json

output: misc/tsconfig.json without comments.

{
  "compilerOptions": {
    "target": "es5",
    "noImplicitAny": true,
    "removeComments": true,
    "outDir": "dist"
  },
  "filesGlob": [
    "src/**/*.ts",
    "!ignored/**/*.ts"
  ],
  "files": [
    "src/bar.ts",
    "src/foo.ts"
  ]
}

install

npm i tsconfig-cli

Downloadsweekly downloads

111

version

2.1.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability