custom-integration.js — astro Source File
Architecture documentation for custom-integration.js, a javascript file in the astro codebase. 2 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR 5c512460_af92_f29b_a770_c2e0c69a24b3["custom-integration.js"] c52a5f83_66e3_37d7_9ebb_767f7129bc62["node:path"] 5c512460_af92_f29b_a770_c2e0c69a24b3 --> c52a5f83_66e3_37d7_9ebb_767f7129bc62 d9a92db9_c95e_9165_13ac_24b3d859d946["node:url"] 5c512460_af92_f29b_a770_c2e0c69a24b3 --> d9a92db9_c95e_9165_13ac_24b3d859d946 f75ce0e6_008d_1602_8638_3ea911d3dd9d["astro.config.mjs"] f75ce0e6_008d_1602_8638_3ea911d3dd9d --> 5c512460_af92_f29b_a770_c2e0c69a24b3 style 5c512460_af92_f29b_a770_c2e0c69a24b3 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { dirname, join } from 'node:path';
import { fileURLToPath } from 'node:url';
/** @type {() => import('astro').AstroIntegration} */
export function myIntegration() {
return {
name: 'my-integration',
hooks: {
'astro:config:setup': ({ addDevToolbarApp }) => {
const importPath = dirname(fileURLToPath(import.meta.url));
const pluginPath = join(importPath, 'custom-plugin.js');
addDevToolbarApp({
id: 'my-plugin',
name: 'My Plugin',
icon: 'astro:logo',
entrypoint: pluginPath
});
},
'astro:server:setup': ({ toolbar }) => {
toolbar.onAppInitialized("my-plugin", () => {
toolbar.send("super-server-event", { message: "Hello from the server!" })
});
}
},
};
}
Domain
Subdomains
Functions
Dependencies
- node:path
- node:url
Source
Frequently Asked Questions
What does custom-integration.js do?
custom-integration.js is a source file in the astro codebase, written in javascript. It belongs to the DevToolbar domain, ToolbarClient subdomain.
What functions are defined in custom-integration.js?
custom-integration.js defines 1 function(s): myIntegration.
What does custom-integration.js depend on?
custom-integration.js imports 2 module(s): node:path, node:url.
What files import custom-integration.js?
custom-integration.js is imported by 1 file(s): astro.config.mjs.
Where is custom-integration.js in the architecture?
custom-integration.js is located at packages/astro/e2e/fixtures/dev-toolbar/custom-integration.js (domain: DevToolbar, subdomain: ToolbarClient, directory: packages/astro/e2e/fixtures/dev-toolbar).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free