-
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename constructor to builder (#332)
* renamed Constructor to Block Builder * updated readme * Update README.md
- Loading branch information
Showing
145 changed files
with
690 additions
and
637 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,100 @@ | ||
# Lazy Blocks - Gutenberg blocks visual constructor | ||
<h1 align="center"> | ||
<a href="https://www.lazyblocks.com/"> | ||
<picture> | ||
<source media="(prefers-color-scheme: dark)" srcset="https://www.lazyblocks.com/logo-white.svg"> | ||
<img src="https://www.lazyblocks.com/logo.svg" height="40" alt="Lazy Blocks - Custom Blocks Builder"> | ||
</picture> | ||
</a> | ||
</h1> | ||
|
||
- Site <https://www.lazyblocks.com/> | ||
- WordPress Plugin <https://wordpress.org/plugins/lazy-blocks/> | ||
<p align="center"> | ||
<a href="https://wordpress.org/plugins/lazy-blocks/"><img alt="WordPress Plugin Version" src="https://img.shields.io/wordpress/plugin/v/lazy-blocks"></a> | ||
<a href="https://wordpress.org/plugins/lazy-blocks/"><img alt="WordPress Plugin Rating" src="https://img.shields.io/wordpress/plugin/rating/lazy-blocks"></a> | ||
<a href="https://wordpress.org/plugins/lazy-blocks/"><img alt="WordPress Plugin Downloads" src="https://img.shields.io/wordpress/plugin/dt/lazy-blocks"></a> | ||
<a href="https://github.com/nk-crew/lazy-blocks/blob/master/LICENSE"><img alt="License" src="https://img.shields.io/github/license/nk-crew/lazy-blocks"></a> | ||
</p> | ||
|
||
<p align="center">Build custom blocks for WordPress block editor (Gutenberg) without coding.</p> | ||
|
||
<p align="center"> | ||
<a href="https://www.lazyblocks.com/">Website</a> <a href="https://www.lazyblocks.com/docs/overview/">Documentation</a> <a href="https://wordpress.org/plugins/lazy-blocks/">WordPress Plugin</a> <a href="https://www.lazyblocks.com/pro/">Pro Version</a> | ||
</p> | ||
|
||
## Overview | ||
|
||
Lazy Blocks is a WordPress plugin that helps you create custom blocks for the Gutenberg editor without coding. Key features: | ||
|
||
- 📝 Visual block builder with drag & drop interface | ||
- 🎛️ Rich set of controls (Text, Image, Gallery, etc.) | ||
- 🔄 Output blocks with PHP, HTML, or theme templates | ||
- ⚡ Extensive filters and actions for developers | ||
|
||
## Development | ||
|
||
### Requirements | ||
### Prerequisites | ||
|
||
- PHP >= 7.2 | ||
- Node.js >= 18.0 | ||
- Composer >= 2.0 | ||
|
||
| Prerequisite | How to check | How to install | | ||
| ------------------------- | ------------- | ----------------------------------------------- | | ||
| PHP >= 5.5.9 | `php -v` | [php.net](https://php.net/manual/en/install.php) | | ||
| Node.js >= 6.x.x | `node -v` | [nodejs.org](https://nodejs.org/) | | ||
| Composer >= 1.0.0 | `composer -V` | [getcomposer.org](https://getcomposer.org) | | ||
### Getting Started | ||
|
||
### Installation | ||
1. Clone the repository | ||
2. Install dependencies: | ||
```bash | ||
npm install | ||
``` | ||
|
||
- Run `npm install` in the command line. Or if you need to update some dependencies, run `npm update` | ||
### Development Commands | ||
|
||
### Building | ||
```bash | ||
# Start development with file watcher | ||
npm run dev | ||
|
||
- `npm run dev` to run build and start files watcher | ||
- `npm run build` to run build | ||
- `npm run build:prod` to run build and prepare zip files for production | ||
# Build for development | ||
npm run build | ||
|
||
### Linting | ||
# Build for production (with zip file) | ||
npm run build:prod | ||
``` | ||
|
||
We use `pre-commit` and `pre-push` hooks for Git to lint sources with `phpcs`, `eslint` and `stylelint` tasks. | ||
### Code Quality | ||
|
||
NPM commands to work with linting: | ||
We use automated tools to ensure code quality. Pre-commit and pre-push hooks are configured for: | ||
- PHP CodeSniffer | ||
- ESLint | ||
- Stylelint | ||
|
||
- `npm run lint:php` to show `phpcs` errors | ||
- `npm run format:php` to automatically fix some of the `phpcs` errors | ||
- `npm run lint:js` to show `eslint` errors | ||
- `npm run format:js` to automatically fix some of the `eslint` errors | ||
- `npm run lint:css` to show `stylelint` errors | ||
- `npm run format:css` to automatically fix some of the `stylelint` errors | ||
```bash | ||
# Linting | ||
npm run lint:php # Check PHP code | ||
npm run lint:js # Check JavaScript code | ||
npm run lint:css # Check CSS code | ||
|
||
All linters compatible with the modern IDE and code editors. | ||
# Auto-fixing | ||
npm run format:php # Fix PHP code | ||
npm run format:js # Fix JavaScript code | ||
npm run format:css # Fix CSS code | ||
``` | ||
|
||
### Testing | ||
|
||
We are using the testing solution provided by the Gutenberg team. To get started you need to [install Docker](https://www.docker.com/). And that's it... All other work will made by `wp-env` package. | ||
We use WordPress's official testing environment powered by Docker and wp-env. | ||
|
||
1. [Install Docker](https://www.docker.com/) on your machine | ||
2. Start the server: | ||
```bash | ||
npm run env:start | ||
``` | ||
3. Run tests: | ||
```bash | ||
# End-to-end tests (Playwright) | ||
npm run test:e2e | ||
|
||
# PHP Unit tests | ||
npm run test:unit:php | ||
``` | ||
|
||
NPM commands to work with testing: | ||
## License | ||
|
||
- `npm run test:e2e` to run end to end tests in the headless browser using Playwright | ||
- `npm run test:unit:php` tp run PHPUnit tests | ||
This project is licensed under the GPL-2.0-or-later License - see the [LICENSE](LICENSE.txt) file for details. |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.