Skip to content

Latest commit

 

History

History
31 lines (25 loc) · 1.31 KB

LAYOUT.md

File metadata and controls

31 lines (25 loc) · 1.31 KB

Source Layout

Template-only guidance. Keep this file in plugin-template; delete it from a target plugin before implementation is complete.

The baseline source entries are:

  • src/index.ts: Loader-facing plugin namespace and public exports;
  • src/config.ts: serializable schema, resolved defaults, and configuration types;
  • src/runtime.ts: fakeable host boundary and Cordis activation.

Keep the baseline files focused. As the plugin grows, use these project-root conventions:

  • extend src/config.ts rather than hiding deployment choices in implementation constants;
  • extend src/runtime.ts with fakeable process, clock, transport, or UI boundaries;
  • add src/<feature>/ for cohesive product capabilities such as commands, providers, renderers, or projections;
  • add src/services/ only when the package actually defines one or more Cordis services;
  • keep Host-facing display assets under src/assets/ and expose them through the public ./locale/*.json and ./icon exports; update files alongside the physical paths.

Create a directory only when production code needs it. Name feature directories after the capability they own rather than copying another plugin's product-specific names. Keep src/index.ts as the Loader boundary instead of turning it into an unstructured implementation file.