Home / Function/ FILES_TO_UPDATE.package.json() — astro Function Reference

FILES_TO_UPDATE.package.json() — astro Function Reference

Architecture documentation for the FILES_TO_UPDATE.package.json() function in template.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  499ba3c0_cbbf_1f08_c6fc_d60d61b66293["FILES_TO_UPDATE.package.json()"]
  33b7e98e_3257_427a_5948_5ab38c474d26["template.ts"]
  499ba3c0_cbbf_1f08_c6fc_d60d61b66293 -->|defined in| 33b7e98e_3257_427a_5948_5ab38c474d26
  style 499ba3c0_cbbf_1f08_c6fc_d60d61b66293 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/create-astro/src/actions/template.ts lines 97–110

	'package.json': (file: string, overrides: { name: string }) =>
		fs.promises.readFile(file, 'utf-8').then((value) => {
			// Match first indent in the file or fallback to `\t`
			const indent = /(^\s+)/m.exec(value)?.[1] ?? '\t';
			return fs.promises.writeFile(
				file,
				JSON.stringify(
					Object.assign(JSON.parse(value), Object.assign(overrides, { private: undefined })),
					null,
					indent,
				),
				'utf-8',
			);
		}),

Domain

Subdomains

Frequently Asked Questions

What does FILES_TO_UPDATE.package.json() do?
FILES_TO_UPDATE.package.json() is a function in the astro codebase, defined in packages/create-astro/src/actions/template.ts.
Where is FILES_TO_UPDATE.package.json() defined?
FILES_TO_UPDATE.package.json() is defined in packages/create-astro/src/actions/template.ts at line 97.

Analyze Your Own Codebase

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

Try Supermodel Free