Using symlinks for Plugin Project Code

Since XD requires you plugin code to live under the develop folder, I tried linking the plugin’s root folder to a more common work related folder. However, XD is smart enough to realize its really an alias, so it refuses to load.

I did find a little trick that will work. Basically create the root folder under develop like your supposed to, and then creating a bunch of symlinks to the contents of the project’s root folder that live elsewhere. This poses an issue when something gets added to the root folder later, and therefore doesn’t have a symlink over in the develop folder.

Long story short, is there anyway to create a symlink in the develop folder to a project’s path somewhere else?

Rather than fighting the system, it’s really easier just to use a nodemon watch followed by a rebuild and an xdpm install to put all the pieces in official places (dev or release).

1 Like

There are also a few templates for plugins on GitHub that have all of this already preconfigured.

For my plugins, I’ve set up a rather feature-rich template (https://github.com/pklaschka/xd-plugin-boilerplate) that includes linting, testing capabilities and more. While you might not need all of those, I’ve tried to keep the dependencies minimal (instead of nodemon, I use webpack --watch, but that basically doesn’t matter). Feel free to have a look and if you have any questions, feel free to ask them :slightly_smiling_face: (of course, I’m not saying you should use mine, everyone has different requirements, it’s just that if you have any questions regarding the use of xdpm, webpack etc. in such a pipeline, this is the one where I potentially know the answers :wink: ).

I see, that simplifies the process for sure.

1 Like

Dude, this looks great! Looks like just what I needed. Having a dedicated dist folder is nice too, I didn’t like it too much just dumping production assets in the project’s root folder.

1 Like