Skip to content
Discussion options

You must be logged in to vote

@ru-van-urk

While technically it's possible to get rid of Templater and replace with this plugin, I would not recommend it as the readability would suffer.

I personally use Templater together with the plugin in a way

<%*

import {
  fn1,
  fn2,
  fn3,
  fn9
} from '/module.ts';

const var4 = fn1(app);
const var5 = await fn2(app.workspace.getActiveFile(), 'arg6');

-%>
Static content <% var4 %>
Another static content <% var5 %>
Inline function call <% fn3(app) %>
Even inline module, but I don't recommend it, as it's too verbose <% await require('/module7.ts').fn8() %>

<%* for (let i = 0; i < 10; i++) { -%>
Generated line <% i %>: <% fn9(i) %>
<%* } -%>

I find it more readable than the exa…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@ru-van-urk
Comment options

Answer selected by ru-van-urk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants