Retool build to produce plugin markdown files, minified/non-minified builds, and compatible JS code#2
Open
lapluviosilla wants to merge 2 commits intoalloy-org:mainfrom
Open
Conversation
…ified versions. Use plugin.config file to produce metadata table.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I retooled the esbuild a bit to produce the plugin markdown files and amplenote compatible code files to make it a bit easier to update and publish plugins.
I also wanted a solution that worked better for iterative development over commit/pushing and using the Github Developers Plugin
Issues it resolves:
return plugin_default;What This Pull Request Does
This pull request fixes these issues by including the readme and metadata in the build, applying some post-build changes to the code to amplenote-ify it, and producing working markdown files with non-minified and minified code options.
The build will now produce 4 files:
build/compiled.js(This is the same as before, except for the small edits mentioned above)build/compiled.min.jsbuild/plugin.mdbuild/plugin.min.mdThe build now uses a new
PLUGIN_README.mdandplugin.config.jsfiles for the plugin readme and table metadata respectively.Notes about
plugin.config.js:plugin.config.jswithout worrying about escaping newlines as you normally would in a table markdown cell. The build will format it appropriately in the output markdown table.The content of the Markdown file can be easily copy/pasted into the plugin note using the Markdown plugin
These plugin changes are backwards compatible! The plugin developer can just use the
build/compiled.jsas before ignoring the new markdown builds if they prefer to just copy the code into their amplenote plugin note and not use the repo to version their readme and metadata.