-
Notifications
You must be signed in to change notification settings - Fork 3
How to Build this Plugin From Source
Sal Ferrarello edited this page Apr 29, 2022
·
2 revisions
Here in GitHub we have the source files. This plugin will not work unless you "build" the source files.
- You should be running version
12of node. This value is defined in.nvmrcso if you are using nvm, runningnvm usewill switch you to the correct version of node. - Run
npm installto pull in all the packages needed to build the source files - Run
npm run buildto create the built file
The built files are added to the /build directory. Specifically, after building the plugin you will see:
/build/index.asset.php/build/index.js
If these files do not appear in your plugin, it will not work.
During development it can be maddening to run npm run build every time you make a change. Running npm run dev instead will allow the process to keep running and listen for changes. Every time your JavaScript changes, the built files will automatically be updated (note: you still need to refresh the browser page for these changes to take effect).