Installation
Clone the skeleton
bash
cd wp-content/plugins
git clone https://github.com/nikoginwp/nikogin my-plugin
cd my-plugin
composer installThe skeleton already includes nikoginwp/framework as a local path repository dependency.
PHP setup
The framework is autoloaded via Composer PSR-4:
| Namespace | Maps to |
|---|---|
Nikogin\Framework\ | framework/src/ |
Nikogin\ | my-plugin/app/ |
Frontend setup
bash
npm install
npm run dev # development server with live reload
npm run build # production buildRename the plugin
- Rename the plugin folder
- Update
nikogin.php— changePlugin Name,NIKOGIN_PLUGIN_FILE - Update
bootstrap/constants.php— changeNIKOGIN_SLUG,NIKOGIN_NAMESPACE,NIKOGIN_PREFIX - Update
composer.json— changenameand the"Nikogin\\"autoload key to your namespace - Run
composer dump-autoload