4 releases (2 breaking)

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

#244 in Configuration

Download history 359/week @ 2024-06-29 466/week @ 2024-07-06 427/week @ 2024-07-13 295/week @ 2024-07-20 410/week @ 2024-07-27 243/week @ 2024-08-03 405/week @ 2024-08-10 307/week @ 2024-08-17 296/week @ 2024-08-24 379/week @ 2024-08-31 189/week @ 2024-09-07 293/week @ 2024-09-14 774/week @ 2024-09-21 148/week @ 2024-09-28 137/week @ 2024-10-05 171/week @ 2024-10-12

1,263 downloads per month
Used in tree-sitter-stack-graphs-…

Custom license

38KB
579 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
~88K SLoC