- PHP 8.0+
- nodejs v16+ with yarn
- Clone the project and remove
.git
- Edit plugin information in
package.json
,config.php
andadmin/info.ts
- In terminal, execute
yarn
to install all package
yarn build
to generate admin and client JS code inpublic/{admin|client}
yarn i18n
to generate pot file underlanguages
folderyarn i18n:json
to generate front-end language json underlanguages
folderyarn plugin-zip
to build zipped package
- Put admin JS block code in
admin/
- Put client JS code using PlainJS in
client/main.ts
- Put Server code in
src
- Start webpack-watch
yarn dev
to watch your code and compile it
yarn i18n
to generatetemplate.pot
file underlanguages
folder- Generate
mo
andpo
file using Poedit or other tools, and put it under languages folder yarn i18n:json
to generate front-end i18n-json- make sure
info.i18nDomain
inadmin/info.tsx
as same asPROJECT_CONFIG['i18n_domain']
inconfig.php