I just wanted to announce that I’ve just open-sourced a boilerplate/template for new plugins, which I’ve set up over time and which now is my “go-to” boilerplate for new plugins.
I’m in no way saying it’s a “perfect” template or anything (and I’m really not trying to create some sort of standard or anything like that – I just wanted to make this open-source in case somebody find it useful). It’s just my go-to template for new plugins and a result of what I’ve learned about plugin development since joining the Beta .
One important recommendation: If you use the template, don’t do everything in the
src/main.js. Instead, create a folder structure that represents your plugin. Personally, I always use a
dialogs folder where all my dialogs exist in different JS files, a
functions folder with all the scenegraph-manipulating functions called after the dialogs and a
helpers folder with everything I need in different places. I’m not saying you should use the same folder structure, but just don’t use 1000 line JS files – you won’t gain any performance by that since Webpack will compile it down to a single file anyway
Feel free to use the boilerplate if you want to – maybe someone will find it useful – you can find it at https://github.com/pklaschka/xd-plugin-boilerplate and usage instructions are in its