Home / File/ index.js — svelte Source File

index.js — svelte Source File

Architecture documentation for index.js, a javascript file in the svelte codebase. 161 imports, 2 dependents.

File javascript Compiler Transformer 161 imports 2 dependents 6 functions

Entity Profile

Dependency Diagram

graph LR
  4aa8a188_84d4_0274_ed83_cac0ab1d3572["index.js"]
  2627a38d_1d02_8fc1_b764_b2aaf06f372b["acorn.js"]
  4aa8a188_84d4_0274_ed83_cac0ab1d3572 --> 2627a38d_1d02_8fc1_b764_b2aaf06f372b
  f47134ed_b840_afa5_bf63_d93768eb2045["parse"]
  4aa8a188_84d4_0274_ed83_cac0ab1d3572 --> f47134ed_b840_afa5_bf63_d93768eb2045
  495501a4_a342_6a4d_ac11_e3e2fee8b218["errors.js"]
  4aa8a188_84d4_0274_ed83_cac0ab1d3572 --> 495501a4_a342_6a4d_ac11_e3e2fee8b218
  a146f6ac_0088_8736_b6ce_318f9f115170["e"]
  4aa8a188_84d4_0274_ed83_cac0ab1d3572 --> a146f6ac_0088_8736_b6ce_318f9f115170
  56a689f9_11c0_cc76_bd60_41bb6dc96475["warnings.js"]
  4aa8a188_84d4_0274_ed83_cac0ab1d3572 --> 56a689f9_11c0_cc76_bd60_41bb6dc96475
  3246e0bc_b9fc_f638_5e35_41e8c39a2408["w"]
  4aa8a188_84d4_0274_ed83_cac0ab1d3572 --> 3246e0bc_b9fc_f638_5e35_41e8c39a2408
  0c5c28a7_226d_4e7c_e75e_0853c0a9fc2c["ast.js"]
  4aa8a188_84d4_0274_ed83_cac0ab1d3572 --> 0c5c28a7_226d_4e7c_e75e_0853c0a9fc2c
  c12e0147_3f27_cf17_5878_e54ffdc328d5["extract_identifiers"]
  4aa8a188_84d4_0274_ed83_cac0ab1d3572 --> c12e0147_3f27_cf17_5878_e54ffdc328d5
  c5b1e5e6_49b7_ac9e_9572_7d6c11e99bc7["has_await_expression"]
  4aa8a188_84d4_0274_ed83_cac0ab1d3572 --> c5b1e5e6_49b7_ac9e_9572_7d6c11e99bc7
  804afe56_25d1_9f41_dafe_adc75e952134["object"]
  4aa8a188_84d4_0274_ed83_cac0ab1d3572 --> 804afe56_25d1_9f41_dafe_adc75e952134
  d935f45f_6959_e32d_6e74_07f0885da3b7["unwrap_pattern"]
  4aa8a188_84d4_0274_ed83_cac0ab1d3572 --> d935f45f_6959_e32d_6e74_07f0885da3b7
  ee93d8a6_6fde_b1c1_e15b_3a4da5326305["scope.js"]
  4aa8a188_84d4_0274_ed83_cac0ab1d3572 --> ee93d8a6_6fde_b1c1_e15b_3a4da5326305
  36ef071d_b929_6d90_0038_9f22de99efbe["Scope"]
  4aa8a188_84d4_0274_ed83_cac0ab1d3572 --> 36ef071d_b929_6d90_0038_9f22de99efbe
  5ab2ae3d_beff_8842_c392_152eeae68035["ScopeRoot"]
  4aa8a188_84d4_0274_ed83_cac0ab1d3572 --> 5ab2ae3d_beff_8842_c392_152eeae68035
  style 4aa8a188_84d4_0274_ed83_cac0ab1d3572 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

/** @import * as ESTree from 'estree' */
/** @import { Binding, AST, ValidatedCompileOptions, ValidatedModuleCompileOptions } from '#compiler' */
/** @import { AnalysisState, Visitors } from './types' */
/** @import { Analysis, ComponentAnalysis, Js, ReactiveStatement, Template } from '../types' */
import { walk } from 'zimmerframe';
import { parse } from '../1-parse/acorn.js';
import * as e from '../../errors.js';
import * as w from '../../warnings.js';
import {
	extract_identifiers,
	has_await_expression,
	object,
	unwrap_pattern
} from '../../utils/ast.js';
import * as b from '#compiler/builders';
import { Scope, ScopeRoot, create_scopes, get_rune, set_scope } from '../scope.js';
import check_graph_for_cycles from './utils/check_graph_for_cycles.js';
import { create_attribute, is_custom_element_node } from '../nodes.js';
import { analyze_css } from './css/css-analyze.js';
import { prune } from './css/css-prune.js';
import { hash, is_rune } from '../../../utils.js';
import { warn_unused } from './css/css-warn.js';
import { extract_svelte_ignore } from '../../utils/extract_svelte_ignore.js';
import { ignore_map, ignore_stack, pop_ignore, push_ignore } from '../../state.js';
import { ArrowFunctionExpression } from './visitors/ArrowFunctionExpression.js';
import { AssignmentExpression } from './visitors/AssignmentExpression.js';
import { AnimateDirective } from './visitors/AnimateDirective.js';
import { AttachTag } from './visitors/AttachTag.js';
import { Attribute } from './visitors/Attribute.js';
import { AwaitBlock } from './visitors/AwaitBlock.js';
import { AwaitExpression } from './visitors/AwaitExpression.js';
import { BindDirective } from './visitors/BindDirective.js';
import { CallExpression } from './visitors/CallExpression.js';
import { ClassBody } from './visitors/ClassBody.js';
import { ClassDeclaration } from './visitors/ClassDeclaration.js';
import { ClassDirective } from './visitors/ClassDirective.js';
import { Component } from './visitors/Component.js';
import { ConstTag } from './visitors/ConstTag.js';
import { DebugTag } from './visitors/DebugTag.js';
import { EachBlock } from './visitors/EachBlock.js';
import { ExportDefaultDeclaration } from './visitors/ExportDefaultDeclaration.js';
import { ExportNamedDeclaration } from './visitors/ExportNamedDeclaration.js';
import { ExportSpecifier } from './visitors/ExportSpecifier.js';
import { ExpressionStatement } from './visitors/ExpressionStatement.js';
import { ExpressionTag } from './visitors/ExpressionTag.js';
import { Fragment } from './visitors/Fragment.js';
import { FunctionDeclaration } from './visitors/FunctionDeclaration.js';
import { FunctionExpression } from './visitors/FunctionExpression.js';
import { HtmlTag } from './visitors/HtmlTag.js';
import { Identifier } from './visitors/Identifier.js';
import { IfBlock } from './visitors/IfBlock.js';
import { ImportDeclaration } from './visitors/ImportDeclaration.js';
import { KeyBlock } from './visitors/KeyBlock.js';
import { LabeledStatement } from './visitors/LabeledStatement.js';
import { LetDirective } from './visitors/LetDirective.js';
import { Literal } from './visitors/Literal.js';
import { MemberExpression } from './visitors/MemberExpression.js';
import { NewExpression } from './visitors/NewExpression.js';
import { OnDirective } from './visitors/OnDirective.js';
import { PropertyDefinition } from './visitors/PropertyDefinition.js';
// ... (1224 more lines)

Domain

Subdomains

Dependencies

Frequently Asked Questions

What does index.js do?
index.js is a source file in the svelte codebase, written in javascript. It belongs to the Compiler domain, Transformer subdomain.
What functions are defined in index.js?
index.js defines 6 function(s): analyze_component, analyze_module, calculate_blockers, get_component_name, js, order_reactive_statements.
What does index.js depend on?
index.js imports 161 module(s): AnimateDirective, AnimateDirective.js, ArrowFunctionExpression, ArrowFunctionExpression.js, AssignmentExpression, AssignmentExpression.js, AttachTag, AttachTag.js, and 153 more.
What files import index.js?
index.js is imported by 2 file(s): index.js, index.js.
Where is index.js in the architecture?
index.js is located at packages/svelte/src/compiler/phases/2-analyze/index.js (domain: Compiler, subdomain: Transformer, directory: packages/svelte/src/compiler/phases/2-analyze).

Analyze Your Own Codebase

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

Try Supermodel Free