Home / Function/ writeJson() — astro Function Reference

writeJson() — astro Function Reference

Architecture documentation for the writeJson() function in fs.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  1536270b_88db_e5e1_0dd0_96190f7ed7ea["writeJson()"]
  ae97098f_05c3_e11f_9a05_46a9f8fa42ea["fs.ts"]
  1536270b_88db_e5e1_0dd0_96190f7ed7ea -->|defined in| ae97098f_05c3_e11f_9a05_46a9f8fa42ea
  style 1536270b_88db_e5e1_0dd0_96190f7ed7ea fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/internal-helpers/src/fs.ts lines 7–9

export async function writeJson<T>(path: PathLike, data: T) {
	await fs.writeFile(path, JSON.stringify(data, null, '\t'), { encoding: 'utf-8' });
}

Domain

Subdomains

Frequently Asked Questions

What does writeJson() do?
writeJson() is a function in the astro codebase, defined in packages/internal-helpers/src/fs.ts.
Where is writeJson() defined?
writeJson() is defined in packages/internal-helpers/src/fs.ts at line 7.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free