Plugin Structure
This awesome plugin can helps you to manage your goals and activities!
★ 0stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/bijit027/plugin_structure/archive/refs/heads/main.zipDeclares an update source (https://developer.wordpress.org/plugins/plugin-basics/header-requirements/), so updates arrive through the plugin's own updater.
From the readme
PluginStructure
step-1:
install vue using vue cli= npm install -g @vue/cli
add package.json file= npm init
install vue latest version (version 3)= npm i vue@next
on src folder add two file naming main.js and App.vue
on main.js: import { createApp } from 'vue' import App from './App.vue' createApp(App).mount('#psp-admin-app')
on App.vue:
{{ msg }}
#export default {
data() {
return {
msg: "hello from admin vue panel",
};
},
}; #"
step-2: install laravel-mix and setup this
install laravel-mix= npm i laravel-mix
on root folder create assets folder. under Asstes folder create Admin folder and then create Admin.js file.
add a file naming webpack.mix.js and add the text:
let mix = require('laravel-mix');
mix.js('src/Main.js', 'Assets/Admin/Admin.js').vue({ version: 3 });
= replace scripts with these text on package.json
"scripts": {
"development": "mix",
"watch": "mix watch",
"watch-poll": "mix watch -- --watch-options-poll=1000",
"hot": "mix watch --hot",
"production": "mix --production"
},
step-3: register and enqueue scripts from wordpress side and target 'Assets/Admin/Admin.js'
step4: add composer command " composer init" for detail follow this video from 16 minutes