Architecture of grapesjs/grapesjs
grapesjs/grapesjs is 640 source files holding 4,318 symbols across 4 modules, written mainly in TypeScript, JavaScript, Vue. The largest module is packages, with 514 files, and 3 files are entry points into the dependency graph.
How grapesjs fits together
Input enters as an HTML-like structure, passed with options such as container, components and style to grapesjs.init. The packages directory holds most of the code, and packages/core wires together editor initialization, the editor model and module loading so the rest of the code can rely on a working editor. Inside packages/core/src/utils/sorter, the file DropLocationDeterminer.ts is a hotspot that works out where a dragged item can be dropped. packages/cli/src/cli.ts is a command-line entry point that parses arguments and routes serving, building and project initialization. The docs directory is the VuePress documentation site, and docs/.vuepress holds Vue components that start the visual editor inside demo pages. The output is the builder itself, which a page or application embeds.
Largest modules
- packages: 514 files and 64,955 lines of code
- docs: 20 files and 947 lines of code
- scripts: 5 files and 105 lines of code
- root: 1 file and 56 lines of code
Languages
By file count: TypeScript 477 files, JavaScript 50 files, Vue 13 files.
Documentation
Repowise documents grapesjs in 763 pages generated from the source, 39 of them written explanations of the repository and its modules. Module guides include:
- root: Application Root Tooling
- packages/core/src/asset_manager: Asset Management Core
- packages/core/src/block_manager: Block Management Core
More on grapesjs: summary and FAQ, codebase overview, code health.