Advanced Table Block for Wordpress Block Editor
This project is a pnpm monorepo. You need to have pnpm installed on your system: https://pnpm.io/installation
Install dependencies: pnpm install.
Run project in watch mode: pnpm start.
Build project: pnpm build.
Export plugin zip: pnpm export.
A monorepo has multiple packages under it.
In tableberg, these packages can be found in the packages directory. We have the free and pro versions of the plugin as packages.
There are some common code used by both versions - we have two more packages for them: shared and components.
The admin page is in the admin package.
To use the plugins in a wordpress installation while development, we need to link the tableberg and pro package directories to the wordpress plugin directory.
For Mac or Linux:
$ ln -s <full-path-to-plugin-scaffold-dir>/apps/<plugin-dir> <full-path-to-wp-dir>/wp-content/plugins/
For Windows, we recommend using junction
$ junction.exe <path-to-plugin-dir> <path-to-wp-dir>/wp-content/plugins/<plugin-dir>
Example:
# MacOS/Linux
$ ln -s /home/dotcamp/example-plugin/apps/example-plugin /var/www/wp-content/plugins/example-plugin
# Windows
$ junction.exe example-plugin\apps\example-plugin D:\www\wp-content\plugins\example-plugin
-
If the changes are very small (one commit), it may be pushed directly to
developbranch. -
If the changes are bigger, a new branch must be created and a pull request must be submitted.
- Do not merge the branch without opening a pull request.
- When a pull request has been merged, the branch should be deleted unless it's needed later.
-
developbranch will represent the next release of tableberg.
Changes should not be pushed directly to master branch. Instead, a pull request must be opened only from develop branch.
masterbranch will represent the published version of tableberg.- Before release, the blocks version (ones that have been updated) and the plugin version must be incremented.
If there are typescript errors but the changes work correctly, the changes may be pushed. Mention the typescript errors in the pr so that reviewers may try to resolve the errors before merging.
If you find that you want to use a component or function from an imported package and it does not have a type signature or the type signature is incorrect, please add the type to a file in the typedefs directory. The filename should match the package name. If you're unsure what the type should be, or have any other questions regarding this process, please create an issue with the label typescript.
To create a release, first, these versions need to be bumped:
- the plugin versions in:
- the php header comments
- plugin constants
- in
readme.txt
- if any blocks have been updated, then the blocks' versions should be upadated in their corresponding
block.json.
Then, a github release is to be created with the plugin zips attached as assets. The zips may be generated by running pnpm run export.