Skip to content

Table Block by Tableberg - Create Better Tables With Block Editor

Notifications You must be signed in to change notification settings

DotCamp/tableberg

Repository files navigation

TableBerg

Advanced Table Block for Wordpress Block Editor

Project Setup

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.

Project Structure

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.

Linking the plugin directories to WordPress installation

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

Rules for contributing:

All changes must be made to the develop branch.

  • If the changes are very small (one commit), it may be pushed directly to develop branch.

  • 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.
  • develop branch 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.

  • master branch will represent the published version of tableberg.
  • Before release, the blocks version (ones that have been updated) and the plugin version must be incremented.

Typescript

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.

Creating a release:

To create a release, first, these versions need to be bumped:

  1. the plugin versions in:
    • the php header comments
    • plugin constants
    • in readme.txt
  2. 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.

About

Table Block by Tableberg - Create Better Tables With Block Editor

Resources

Stars

Watchers

Forks

Contributors 8