• Stars
    star
    108
  • Rank 321,259 (Top 7 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created almost 10 years ago
  • Updated 12 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Resolve and parse `tsconfig.json`, replicating TypeScript's behaviour

TSConfig

NPM version NPM downloads Build status Test coverage

Resolve and parse tsconfig.json, replicating TypeScript's behaviour.

Usage

See the TypeScript docs for information on setting up tsconfig.json.

API

  • resolve(cwd: string, path?: string): Promise<string | void> Resolve tsconfig.json, like TypeScript, allowing a path to be specified and falling back to recursively resolving tsconfig.json upward when no path is specified.
  • resolveSync(cwd: string, path?: string): string | void Synchronous resolve.
  • find(cwd: string): Promise<string | void> Standalone behaviour of recursively resolving tsconfig.json upward.
  • findSync(cwd: string): string | void Synchronous find.
  • load(cwd: string, path?: string): Promise<{ path?: string, config: any }> Resolve, load and parse tsconfig.json.
  • loadSync(cwd: string, path?: string): { path?: string, config: any } Synchronous load.
  • readFile(filename: string): Promise Read a JSON file as tsconfig.json (strip BOM, parse JSON and support empty contents).
  • readFileSync(filename: string): any Synchronous readFile.
  • parse(contents: string, filename: string): any Parse file contents as tsconfig.json (strip BOM, parse JSON and support empty contents).

Contributing

Feel free to open issues for discussion.

# Install dependencies/typings.
npm install

# Run test suite.
npm test

License

MIT License

More Repositories

1

ts-node

TypeScript execution and REPL for node.js
TypeScript
12,883
star
2

typedoc

Documentation generator for TypeScript projects.
TypeScript
7,701
star
3

ts-loader

TypeScript loader for webpack
TypeScript
3,453
star
4

fork-ts-checker-webpack-plugin

Webpack plugin that runs typescript type checker on a separate process.
TypeScript
1,952
star
5

atom-typescript

The only TypeScript package you will ever need
TypeScript
1,131
star
6

learn-typescript

The complete workshop for picking up TypeScript
TypeScript
697
star
7

tsify

Browserify plugin for compiling TypeScript
JavaScript
345
star
8

grunt-ts

A grunt task to manage your complete typescript development to production workflow
JavaScript
330
star
9

dts-bundle

Export TypeScript .d.ts files as an external module definition
TypeScript
309
star
10

ts-expect

Checks TypeScript types match expected values
TypeScript
215
star
11

ntypescript

Nicer TypeScript for API devs
JavaScript
116
star
12

typedoc-default-themes

Handlebars
57
star
13

typedoc-site

Website for TypeDoc
TypeScript
41
star
14

grunt-typedoc

Grunt plugin to generate TypeScript docs with TypeDoc
JavaScript
17
star
15

tspms

An abstraction on top TypeScript language service, that let you consume it in the context of a project.
TypeScript
15
star
16

typedoc-auto-docs

An idea from TS Discord to automatically render docs for the ecosystem, similar to docs.rs and doc.deno.land
TypeScript
10
star
17

typescript-compiler-docs

Community docs about typescript's compiler and APIs
9
star
18

atom-typescript-examples

Temporary location of examples for mutual testing
JavaScript
9
star
19

tscs

TypeScript Compiler Services
JavaScript
8
star
20

ts-node-repros

Dockerfile
7
star
21

grunt-ts-clean

Grunt plugin to cleanup TypeScript builds for release.
JavaScript
7
star
22

csproj2ts

Library to parse TypeScript config info from a Visual Studio Project file
TypeScript
6
star
23

fs-fixture-builder

TypeScript
6
star
24

tsproj

A specification for a file format + Parser Implementation for specifying TypeScript projects
TypeScript
6
star
25

typedoc-repros

Shell
5
star
26

grunt-dts-bundle

Grunt plugin to export TypeScript .d.ts files as an external module definition
JavaScript
5
star
27

typestrong.github.io

Website
HTML
5
star
28

typedoc-action

TypeScript
5
star
29

typestrong-compiler

experimental compiler module
JavaScript
4
star
30

discussions

Open organization discussions
4
star
31

ts-node-examples

TypeScript
3
star