Home / File/ index.js — astro Source File

index.js — astro Source File

Architecture documentation for index.js, a javascript file in the astro codebase.

Entity Profile

Relationship Graph

Source Code

#!/usr/bin/env node
export default async function run() {
	const [cmd, ...args] = process.argv.slice(2);
	switch (cmd) {
		case 'dev':
		case 'build': {
			const { default: build } = await import('./cmd/build.js');
			await build(...args, cmd === 'dev' ? 'IS_DEV' : undefined);
			break;
		}
		case 'prebuild': {
			const { default: prebuild } = await import('./cmd/prebuild.js');
			await prebuild(...args);
			break;
		}
		case 'test': {
			const { default: test } = await import('./cmd/test.js');
			await test(...args);
			break;
		}
	}
}

run();

Domain

Subdomains

Functions

Frequently Asked Questions

What does index.js do?
index.js is a source file in the astro codebase, written in javascript. It belongs to the CoreAstro domain, RoutingSystem subdomain.
What functions are defined in index.js?
index.js defines 1 function(s): run.
Where is index.js in the architecture?
index.js is located at scripts/index.js (domain: CoreAstro, subdomain: RoutingSystem, directory: scripts).

Analyze Your Own Codebase

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

Try Supermodel Free