To use GitHub plugin builder, you need to add the path to your public GitHub repo to a plugin note. The repo URL needs to be preceded by "repo:" or "entry:"

repo: https://github.com/yourorganization/yourrepo
entry: https://github.com/youroganization/yourrepo/path/to/esbuild/compiled/build.js

If the repo: directive is used, we will check for your plugin's entry file in three locations: lib/plugin.js, plugin.js, and index.js. After discovering the entry file, we will parse its code block and import statements. The functions that exist within the imported modules are collected and inserted into the entry file's code block.

The repo or entry declaration can be placed anywhere in your plugin file. Once you have installed the plugin and added the specified line to a plugin note, you can invoke the plugin by either using the expression "{Github Plugin Builder: Refresh}" or by choosing "GitHub Plugin Builder: Refresh" from the "Note options" menu in the upper-right corner of a note.

Recommendation: Use esbuild
While this plugin hand-rolls an import implementation that will suffice for simple imports of functions and constants, if you're building a serious, multi-file plugin, you'll eventually find an edge case where the handrolled import is insufficient. That's why, for professional plugin developers, we recommend using esbuild. It is a well-tested tool that can process an entry point file and inline all the constants & functions. Check out (and consider copying?) the esbuild configuration for this project at https://github.com/alloy-org/plugin-builder/blob/main/esbuild.js.

When esbuild.js is run (e.g., by choosing "Run esbuild" in Webstorm), it will generate an output file in the location specified by "outfile" in esbuild.build. You can define that output file as your "Entry" file, as this very plugin does: Entry: https://github.com/alloy-org/plugin-builder/build/compiled.js

Caveats
Namespaces are not supported -- all of the imported files have to declare functions at the root level unless using esbuild.

Known issues
1. If a function is specified with the const func = (variable) => { syntax, you must use parenthesis around your parameter, unless using esbuild.