Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tsconfig

Package Overview
Dependencies
Maintainers
2
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tsconfig - npm Package Compare versions

Comparing version 0.0.3 to 1.0.0

dist/tsconfig.d.ts

95

package.json
{
"name": "tsconfig",
"version": "0.0.3",
"description": "TypeScript project file specification + implementation",
"main": "dist/lib/index.js",
"typescript": {
"definition": "dist/lib/tsconfig.d.ts"
},
"directories": {
"test": "tests"
},
"scripts": {
"test": "node ./node_modules/mocha/bin/mocha dist/test/**/*.js"
},
"repository": {
"type": "git",
"url": "https://github.com/TypeStrong/tsconfig.git"
},
"keywords": [
"TypeScript",
"compiler"
],
"author": "basaratali@gmail.com",
"license": "MIT",
"bugs": {
"url": "https://github.com/TypeStrong/tsconfig/issues"
},
"homepage": "https://github.com/TypeStrong/tsconfig",
"dependencies": {
"js-yaml": "^3.2.3",
"glob-expand": "0.0.2"
},
"devDependencies": {
"grunt": "^0.4.5",
"grunt-ts": "^1.12.1",
"mocha": "^2.0.1",
"chai": "^1.10.0",
"typescript": "^1.3.0",
"grunt-dts-bundle": "^0.2.0"
}
"name": "tsconfig",
"version": "1.0.0",
"description": "TypeScript project file specification + implementation",
"main": "dist/tsconfig.js",
"typescript": {
"definition": "tsconfig.d.ts"
},
"files": [
"dist/",
"LICENSE",
"tsconfig.d.ts"
],
"scripts": {
"lint": "# TODO",
"build": "npm run build-ts",
"build-ts": "rm -rf dist && tsc",
"test-spec": "mocha dist/**/*.spec.js -R spec --bail",
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- dist/**/*.spec.js -R spec --bail",
"test": "npm run build && npm run lint && npm run test-cov",
"prepublish": "npm run build"
},
"repository": {
"type": "git",
"url": "https://github.com/TypeStrong/tsconfig.git"
},
"keywords": [
"TypeScript",
"compiler",
"config",
"tsconfig",
"json",
"resolve"
],
"author": {
"name": "Blake Embrey",
"email": "hello@blakeembrey.com",
"url": "http://blakeembrey.me"
},
"contributors": [
"basaratali@gmail.com"
],
"license": "MIT",
"bugs": {
"url": "https://github.com/TypeStrong/tsconfig/issues"
},
"homepage": "https://github.com/TypeStrong/tsconfig",
"dependencies": {
"globby": "^2.1.0",
"xtend": "^4.0.0"
},
"devDependencies": {
"chai": "^3.0.0",
"istanbul": "^0.3.17",
"mocha": "^2.0.1",
"typescript": "^1.5.0-beta"
}
}

@@ -1,45 +0,42 @@

# tsconfig
[![Build Status](https://secure.travis-ci.org/TypeStrong/tsconfig.svg?branch=master)](http://travis-ci.org/TypeStrong/tsconfig)
# TSConfig
Based on [this spec](https://github.com/Microsoft/TypeScript/issues/1667) and [this implementation](https://github.com/Microsoft/TypeScript/pull/1692)
[![NPM version][npm-image]][npm-url]
[![NPM downloads][downloads-image]][downloads-url]
[![Build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]
A specification for a file format + parser Implementation for specifying TypeScript projects
Resolve and parse [`tsconfig.json`](https://github.com/Microsoft/TypeScript/wiki/tsconfig.json), with support for `filesGlob` (array of glob strings).
# Specification
## Configuration file format
Specify the project configuration in a `tsconfig.json` file in the root of your project. The structure will be specified using the interface `TypeScriptProjectSpecification`:
## Usage
```ts
interface CompilerOptions {
target?: string; // 'es3'|'es5' (default) | 'es6'
module?: string; // 'amd'|'commonjs' (default)
See the [TypeScript wiki](https://github.com/Microsoft/TypeScript/wiki/tsconfig.json) for information on setting up `tsconfig.json`. Additionally, this module will parse the `filesGlob` option, if it exists.
declaration?: boolean; // Generates corresponding `.d.ts` file
out?: string; // Concatenate and emit a single file
outDir?: string; // Redirect output structure to this directory
### API
noImplicitAny?: boolean; // Error on inferred `any` type
removeComments?: boolean; // Do not emit comments in output
* `resolve(dir: string, cb: (err: Error, filename?: string) => any)` Aschronously resolve the location of `tsconfig.json`
* `resolveSync(dir: string): string` Synchronous version of `resolve`
* `load(dir: string, cb: (err: Error, config?: TSConfig) => any)` Resolve, load and parse `tsconfig.json` from a directory
* `loadSync(dir: string): TSConfig` Synchronous version of `load`
* `readFile(filename: string, cb: (err: Error, config?: TSConfig) => any)` Read any file as `tsconfig.json`
* `readFileSync(filename: string): TSConfig` Synchronous version of `readFile`
* `parseFile(contents: string, filename: string, cb: (err: Error, config?: TSConfig) => any)` Parse any string using TSConfig
* `parseFileSync(contents: string, filename: string): TSConfig` Synchronous version of `parseFile`
* `resolveConfig(data: TSConfig, filename: string, cb: (err: Error, config?: TSConfig) => any)` Resolve a `tsconfig.json` object against a filename (E.g. `filesGlob`)
* `resolveConfigSync(data: TSConfig, filename: string): TSConfig` Synchronous version of `resolveConfig`
sourceMap?: boolean; // Generates SourceMaps (.map files)
sourceRoot?: string; // Optionally specifies the location where debugger should locate TypeScript source files after deployment
mapRoot?: string; // Optionally Specifies the location where debugger should locate map files after deployment
}
## Contributing
Please open issues for discussion.
// Main configuration
interface TypeScriptProjectSpecification {
compilerOptions: CompilerOptions;
files?: string[]; // optional: paths to files
filesGlob?: string[]; // optional: An array of 'glob / minimatch / RegExp' patterns to specify source files
}
```
*Note:* `filesGlob` can be fairly dynamic. See [node-glob](https://github.com/isaacs/node-glob) and [minimatch](https://github.com/isaacs/minimatch) (similar to `grunt`) for all the configuration options. If you call any of the API in this project that reads a `tsconfig.json` file, the `files-glob` is auto expanded (on disk) into `files` before returning.
## License
Please see the valid projects folder : https://github.com/TypeStrong/tsconfig/tree/master/testprojects/valid
MIT License
## Public API
See [`tsconfig.d.ts`](https://github.com/TypeStrong/tsconfig/blob/master/dist/lib/tsconfig.d.ts). API exists for querying the projects file, querying the projects relevant for single TypeScript file and creating a new projects file.
# Contributing
Please open issues for discussion.
[npm-image]: https://img.shields.io/npm/v/tsconfig.svg?style=flat
[npm-url]: https://npmjs.org/package/tsconfig
[downloads-image]: https://img.shields.io/npm/dm/tsconfig.svg?style=flat
[downloads-url]: https://npmjs.org/package/tsconfig
[travis-image]: https://img.shields.io/travis/TypeStrong/tsconfig.svg?style=flat
[travis-url]: https://travis-ci.org/TypeStrong/tsconfig
[coveralls-image]: https://img.shields.io/coveralls/TypeStrong/tsconfig.svg?style=flat
[coveralls-url]: https://coveralls.io/r/TypeStrong/tsconfig?branch=master

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc