The following snippet explains how the Gutenberg repository is structured omitting irrelevant or obvious items with further explanations:
β
βββ LICENSE
βββ README.md
βββ SECURITY.md
βββ CONTRIBUTING.md
β
βββ .editorconfig
βββ .eslintignore
βββ .eslintrc
βββ .jshintignore
βββ .eslintignore
βββ .prettierrc.js
βββ .stylelintignore
βββ .stylelintrc.js
βββ .markdownlintignore
βββ .npmpackagejsonlintrc.json
βββ phpcs.xml.dist
β Dot files and config files used to configure the various linting tools
β used in the repository (PHP, JS, styles...).
β
βββ .browserslistrc
βββ babel.config.js
βββ jsconfig.json
βββ tsconfig.json
βββ tsconfig.base.json
βββ webpack.config.js
β Transpilation and bundling Config files.
β
βββ .wp-env.json
β Config file for the development and testing environment.
β Includes WordPress and the Gutenberg plugin.
β
βββ composer.lock
βββ composer.json
β Handling of PHP dependencies. Essentially used for development tools.
β The production code don't use external PHP dependencies.
β
βββ package-lock.json
βββ package.json
β Handling of JavaScript dependencies. Both for development tools and
β production dependencies.
β The package.json also serves to define common tasks and scripts
| used for day to day development.
β
βββ changelog.txt
βββ readme.txt
β Readme and Changelog of the Gutenberg plugin hosted on the WordPress
β plugin repository.
β
βββ gutenberg.php
β Entry point of the Gutenberg plugin.
β
βββ post-content.php
β Demo post content used on the Gutenberg plugin to showcase the editor.
β
βββ .github/*
β Config of the different GitHub features (issues and PR templates, CI, owners).
β
βββ bin/api-docs
β Tool/script used to generate the API Docs.
β
βββ bin/packages
β Set of scripts used to build the WordPress packages.
β
βββ bin/plugin
β Tool use to perform the Gutenberg plugin release and the npm releases as well.
β
βββ docs/tool
β Tool used to generate the Block editor handbook's markdown pages.
β
βββ docs/*.md
β Set of documentation pages composing the [Block editor handbook](https://developer.wordpress.org/block-editor/).
β
βββ platform-docs
β Documentation website targeted to non WordPress developers
β using Gutenberg in their own applications.
β Deployed on [https://wordpress.org/gutenberg-framework/](https://wordpress.org/gutenberg-framework/).
β
β
βββ lib
β PHP Source code of the Gutenberg plugin.
β
βββ lib/compact/wordpress-x.x
β PHP code that was include in WordPress ont the WordPress X.X version.
β It is kept to ensure plugin compatibility with older WordPress versions.
β
βββ packages
β Source code of the WordPress packages.
β Packages can be:
β - Production JavaScript scripts and styles loaded on WordPress
β and the Gutenberg plugin or distributed as npm packages.
β - Development tools available on npm.
β
βββ packages/{packageName}/package.json
β Dependencies of the current package.
β
βββ packages/{packageName}/CHANGELOG.md
βββ packages/{packageName}/README.md
β
βββ packages/{packageName}/src/**/*.js
βββ packages/{packageName}/src/**/*.scss
β Source code of a given package.
|
βββ packages/{packageName}/src/**/*.test.js
β JavaScript unit tests.
|
βββ packages/{packageName}/src/**/{ComponentName}/index.js
β Entry point of a given component.
|
βββ packages/{packageName}/src/**/{ComponentName}/style.scss
β Style entry point for a given component.
β
βββ packages/{packageName}/src/**/{ComponentName}/stories/*.jsx
β Component Stories to load on the Gutenberg storybook.
β
βββ phpunit
β Unit tests for the PHP code of the Gutenberg plugin.
β
βββ storybook
β Config of the [Gutenberg Storybook](https://wordpress.github.io/gutenberg/).
β
βββ test/integration
β Set of WordPress packages integration tests.
β
βββ test/native
β Configuration for the Gutenberg Mobile unit tests.
β
βββ test/unit
β Configuration for the Packages unit tests.
β
βββ test/e2e
β End-2-end tests of the Gutenberg plugin.
β
βββ test/performance
β Performance metrics. Results are tracked on the [Gutenberg performance dashboard](https://codevitals.run/project/gutenberg).
β
βββ tools/eslint
β Configuration files for the ESLint linter.
β
βββ tools/webpack
β Configuration files for the webpack build.