Compatible with upcoming OJS 3.5 release candidate. For version 3.4 check the stable-3_4_0 branch.
- Install vite@6 -
npm install --save-dev vite@6 - Copy over the i18nExtractKeys.vite.js to make easy to use translation in the vue.js components
- Copy over vite.config.js, adjust if necessary
- You can follow the eslint/prettier setup - but thats very much optional
- Copy over relevant scripts from the
package.jsonto your package.json - Create
resources/js/main.js, which will be entry point to register your components - Check out
registerfunction inBackendUiExamplePlugin.inc.phpto see how to register the new JS and CSS file.
Additional tab is injected in Settings -> Website -> Setting Example tab
Components in ui-library are globally available with pkp prefix. Check for example BuiPublicationListing.vue, which is leveraging table component.
Check out BuiMyComponentWithDialog.vue to see example. Another useful example is in main.js, with new custom action for file manager, which also open dialog.
Check out BuiExampleTab.vue, where interacting with API using useFetch and useUrl is illustrated.
Checkout main.js to see how to add custom column or action. Fetching additional data for displayed files is also demonstrated..
Checkout main.js, particularly extending getMenuItems and getPrimaryItems.
Also check out generic plugin template https://github.com/pkp/pluginTemplate to see how the cypress test can be written to automatically test your plugin.
