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

Improve modularity #21

Open
Maingron opened this issue Nov 1, 2021 · 0 comments
Open

Improve modularity #21

Maingron opened this issue Nov 1, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@Maingron
Copy link
Owner

Maingron commented Nov 1, 2021

Define: Extensions = Combination of HTML Template and JS which together make up a block, for example.

Currently you can write Extensions like this: Block Templates in HTML and JS separately.

In future there should be a new parser which allows to write everything / every extension respectively in it's own clockHTML file.

The parser would then import all Extensions.
Maybe something like this:

mymod.html:

<template something>
... (HTML Templates goes here)

<tick>
developers_custom_function() {
  document.body.style.opacity -= .1;
}
</tick>
</template>

Where <tick> would be the JavaScript which currently would have to be hardcoded into the js tick section.

With the new system, <tick> would be eliminated from the cached extension file by the parser and instead be appended to the cached global tick.

Those "cached" files are rebuilt every time the clock is reloaded and should probably be stored in CachedStorage(). Once they're built, they'd get appended to the index.html, I guess.

This is a major change, but it'd be a good change.

@Maingron Maingron added the enhancement New feature or request label Nov 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant