Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Macros #127

Open
eldoy opened this issue Aug 6, 2023 · 1 comment
Open

Macros #127

eldoy opened this issue Aug 6, 2023 · 1 comment

Comments

@eldoy
Copy link
Owner

eldoy commented Aug 6, 2023

Before loading the file, it would be cool to support "macros". Macros before, compile after.

Macros should swap or transform file content with other content, for example with pluss, JS language features, etc. functions.

In app/macros we could define functions that are callable but not included.

We could write:

fn hello() {
}

and get:

function hello() {
}

or

<.hello#some>

and get

<div class="hello" id="#some">

etc...

This could also be solved with a shadow editor, or a WYSINWYG.

@eldoy
Copy link
Owner Author

eldoy commented Mar 16, 2024

Implemented in HTML6 with onrequire callback using require-from-string. Current only works for .js files. Need onrequire callback for it to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant