packages/docs/creating-a-new-package.md
This document describes the process of creating a new package in the monorepo. It will also help you determine if you should create a new package or add your code to an existing package.
In order to make the monorepo manageable, we try to avoid creating unnecessary packages. Therefore, we don't create a new package unless we really need to.
To determine if some code should be inside an existing package or have its own package, we usually ask ourselves the following questions:
@elementor/env & @elementor/store packages for example, or we would merge them into a single @elementor/infra package, depending on the situation and requirements)By merging your changes, the package will be published to npm automatically.
If you want to skip publishing a package, you can apply the skip publish label to the pull request.
For testing a package from the Elementor Packages repository, within the context of the Elementor Plugin, follow the steps in the contribution guide.
In order to add a new package to Elementor Core, you need to do the following:
npm i @elementor/package-name).{elementor-plugin-path}/core/editor/loader/v2/editor-v2-loader.php. This option always loads the package.elementor/editor/v2/packages. This option provides flexibility, enabling you to load the package based on specific criteria. It also allows you to encapsulate the package loading separately for better organization and maintainability.