Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including tsconfig-files with all npm packages installed. Try it out:

var tsconfigFiles = require("tsconfig-files")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

tsconfig-files v1.0.0

A small library to find source files from a tsconfig.json file.

tsconfig-files

npm version

A small library to find source files from a tsconfig.json file.

Install

$ npm install tsconfig-files

Usage

example.js:

// import {getFilesFromTsconfig} from "tsconfig-files";
const getFilesFromTsconfig = require("tsconfig-files").getFilesFromTsconfig;

getFilesFromTsconfig('.').then((files) => {
    console.log(files);
}, (error) => {
    console.error(error);
});

API

getFilesFromTsconfig(cwd): Promise<string[]>

Returns a Promise containing the files matched by tsconfig.json in cwd.

getFilesFromTsconfigSync(cwd): string[]>

Returns the files matched by tsconfig.json in cwd. The async form is preferred over this function.

getFilesFromTsconfigJson(json, root): Promise<string[]>

Returns a Promise containing the files matched by the provided tsconfig json.

getFilesFromTsconfigSync(json, root): string[]>

Returns the files matched by the provided tsconfig json. The async form is preferred over this function.

License

MIT © eth-p

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free