CodeScript Toolkit
approvedby mnaoumov
Allows to do a lot of things with JavaScript/TypeScript scripts from inside the Obsidian itself
CodeScript Toolkit
formerly known as
Fix Require Modules, see Rebranding section for more details
This is a plugin for Obsidian that allows to do a lot of things with JavaScript/TypeScript scripts from inside the Obsidian itself.
Who is this plugin for?
This plugin is for you if you want to:
- Write in any flavor of
JavaScript/TypeScriptin:DevTools ConsolewithinObsidian;CustomJSscripts;datacorejs/datacorejsx/datacorets/datacoretsxscripts;dataviewjsscripts;JS Enginescripts;Modulesscripts;QuickAddscripts;Templaterscripts;- etc.
- Write modular scripts using modern
JavaScript/TypeScriptsyntax and patterns. - Prototype
Obsidianplugins. - Explore
ObsidianAPI (public and internal) in runtime easier. - Invoke any
JavaScript/TypeScriptscript via command or hotkey.
Why this plugin?
There are several very good plugins that allow to write JavaScript/TypeScript scripts for Obsidian, but they all have their own limitations and quirks.
Most of those plugins support writing scripts in CommonJS (cjs) only, which is not so used nowadays.
None of those plugins provide you the developer experience as you would have in any other modern JavaScript/TypeScript development environment.
This plugin aims to erase the line between the Obsidian world and the JavaScript/TypeScript development world.
Usage
See docs.
You can download demo vault to see usage examples.
Installation
The plugin is available in the official Community Plugins repository.
Beta versions
To install the latest beta release of this plugin (regardless if it is available in the official Community Plugins repository or not), follow these steps:
- Ensure you have the BRAT plugin installed and enabled.
- Click Install via BRAT.
- An Obsidian pop-up window should appear. In the window, click the
Add pluginbutton once and wait a few seconds for the plugin to install.
Debugging
By default, debug messages for this plugin are hidden.
To show them, run the following command:
window.DEBUG.enable('fix-require-modules');
For more details, refer to the documentation.
Rebranding
This plugin was formerly known as Fix Require Modules.
The plugin quickly overgrew its original purpose and got way more features than just fixing require() calls. That's why it got a new name.
However, for the backward compatibility, the previous id fix-require-modules is still used internally and you might find it
- in plugin folder name;
- in plugin URL;
- in Debugging section;
Support
My other Obsidian resources
See my other Obsidian resources.
License
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.
