3 unstable releases

0.2.1 Jan 29, 2024
0.2.0 Mar 23, 2023
0.1.0 Apr 25, 2021

#231 in Configuration

Download history 1071/week @ 2023-12-18 1001/week @ 2023-12-25 1035/week @ 2024-01-01 970/week @ 2024-01-08 1086/week @ 2024-01-15 309/week @ 2024-01-22 149/week @ 2024-01-29 121/week @ 2024-02-05 61/week @ 2024-02-12 75/week @ 2024-02-19 57/week @ 2024-02-26 163/week @ 2024-03-04 123/week @ 2024-03-11 46/week @ 2024-03-18 122/week @ 2024-03-25 126/week @ 2024-04-01

422 downloads per month
Used in tree-sitter-stack-graphs-…

Custom license

37KB
570 lines

Rust

tsconfig

A Rust crate for parsing TypeScript's TSConfig files into a Rust struct.

A TSConfig file in a directory indicates that the directory is the root of a TypeScript or JavaScript project.

The TSConfig file can be either a tsconfig.json or jsconfig.json; both have the same behavior and the same set of config variables. One TSConfig can inherit fields from another if it is specified in the 'extends' field.

Example usage

use tsconfig::TsConfig;
use std::path::Path;
let path = Path::new(&std::env::var("CARGO_MANIFEST_DIR").unwrap())
    .join("test/tsconfig.default.json");
let config = TsConfig::parse_file(&path).unwrap();

lib.rs:

A Rust crate for parsing TypeScript's TSConfig files into a struct.

A TSConfig file in a directory indicates that the directory is the root of a TypeScript or JavaScript project. The TSConfig file can be either a tsconfig.json or jsconfig.json; both have the same behavior and the same set of config variables.

One TSConfig can inherit fields from another if it is specified in the 'extends' field.

Example usage

use tsconfig::TsConfig;
use std::path::Path;

let path = Path::new(&std::env::var("CARGO_MANIFEST_DIR").unwrap())
    .join("test/tsconfig.default.json");
let config = TsConfig::parse_file(&path).unwrap();

Dependencies

~2.8–4.5MB
~87K SLoC