Comparing version 0.0.3 to 1.0.0
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
4
0
1
22043
10
253
43
2
+ Addedglobby@^2.1.0
+ Addedxtend@^4.0.0
+ Addedarray-union@1.0.2(transitive)
+ Addedarray-uniq@1.0.3(transitive)
+ Addedasync@1.5.2(transitive)
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedglob@5.0.15(transitive)
+ Addedglobby@2.1.0(transitive)
+ Addedinflight@1.0.6(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedminimatch@3.1.2(transitive)
+ Addedobject-assign@3.0.0(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedpath-is-absolute@1.0.1(transitive)
+ Addedwrappy@1.0.2(transitive)
+ Addedxtend@4.0.2(transitive)
- Removedglob-expand@0.0.2
- Removedjs-yaml@^3.2.3
- Removedargparse@1.0.10(transitive)
- Removedesprima@4.0.1(transitive)
- Removedglob@3.1.21(transitive)
- Removedglob-expand@0.0.2(transitive)
- Removedgraceful-fs@1.2.3(transitive)
- Removedinherits@1.0.2(transitive)
- Removedjs-yaml@3.14.1(transitive)
- Removedlodash@1.2.1(transitive)
- Removedlru-cache@2.7.3(transitive)
- Removedminimatch@0.2.14(transitive)
- Removedsigmund@1.0.1(transitive)
- Removedsprintf-js@1.0.3(transitive)