tsconfig-files
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

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

/tsconfig-files/

    Package Sidebar

    Install

    npm i tsconfig-files

    Weekly Downloads

    0

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    18.6 kB

    Total Files

    6

    Last publish

    Collaborators

    • eth-p