Skip to content
This repository has been archived by the owner on Aug 14, 2021. It is now read-only.

Convert templates from .hbs to .tsx #137

Draft
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

cspotcode
Copy link

@cspotcode cspotcode commented Jul 15, 2021

I was nerd-sniped by our discussion on Discord, so I tried to automatically convert the .hbs into .tsx This is as far as I got. convert.ts attempts to use a third-party library to do the conversion. It complains about some stuff that I've been manually find-and-replacing.

TODO

  • converge item and props variables. Using both was a hack because the hbs to jsx converter uses item for #each iteration but props for the top-level props object.
  • assign a type to the input of each component; right now it is implicit any
  • switch to preact? it's what Gerrit0 was using in library-mode branch
  • write a Theme interface; import and consolidate all functions into a single Theme instance
  • fix IfCond invocations to pass a boolean wrapped in {}
    • Ideally remove IfCond entirely, but would be annoying for an MVP
  • implement IfSignature
  • implement Markdown
  • implement Collapse: what even is this?
  • fix the inline className conditionals that I hacked away to please the converter

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

Successfully merging this pull request may close these issues.

None yet

1 participant