GithubHelp home page GithubHelp logo

dearvn / wp-react-example Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 1.0 315 KB

Build plugin of Wordpress with react aim to learn

PHP 66.76% JavaScript 32.96% SCSS 0.17% CSS 0.12%
reactjs wordpress-plugin wordpress-react wordpress-code-review wordpress-standards wordpress-starter-plugin

wp-react-example's Introduction

wp-react-kit

A simple starter kit to work in WordPress with WP-script, React, React Router, Tailwind CSS, PostCSS, Eslint, i18n, PHP OOP plugin architecture easily in a minute.


Quick Start

# Clone the Git repository
git clone https://github.com/dearvn/wp-react-example.git

# Install node module packages
npm i

# Install PHP-composer dependencies [It's empty]
composer install

# Start development mode
npm start

# Start development with hot reload (Frontend components will be updated automatically if any changes are made)
npm run start:hot

# To run in production
npm run build

After running start, or build command, there will be a folder called /build will be generated at the root directory.

Browse Plugin

**using https://github.com/dearvn/wp-deployment to deploy in local enviroment

http://wordpress.local:8080/wp/wp-admin/admin.php?page=jobplace#/

Where, /wpex is the project root folder inside /htdocs.

Or, it could be your custom processed URL.

Version & Changelogs

v0.0.1 - 02/08/2022

  1. Necessary traits to handle - sanitization, query.
  2. Advanced setup for migration, seeder, REST API.
  3. Jobs, Job Types REST API developed.

PHP Coding Standards - PHPCS

Get all errors of the project:

vendor/bin/phpcs .

Fix all errors of the project:

vendor/bin/phpcbf .
Options for specific files:

Get specific file errors of the project:

vendor/bin/phpcs job-place.php

Fix specific file errors of the project:

vendor/bin/phpcbf job-place.php

Check coding convention

Fixing errors for input data

https://github.com/WordPress/WordPress-Coding-Standards/wiki/Fixing-errors-for-input-data#nonces

Yoda Conditions: To Yoda or Not to Yoda

https://knowthecode.io/yoda-conditions-yoda-not-yoda

wp-react-example's People

Contributors

dearvn avatar donaldnguyen avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

mohanrau

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.