custom imports

https://perchance.org/animus2

is there a way to break up a perchance generator into multiple separate smaller generators and use import to combine them into the parent generator? when i've tried this, the imports consistently fail, so i'm not sure what is happening.

this generator has become extremely large and difficult to edit due to the size in a SFA (nearly 38k lines of code).

thanks, roy

5 points · 2 comments · view on lemmy.world

2 Comments

qinerous@lemmy.world · 4 pts · 166d (1 reply)

Oh, there's really a lot of code here

You can define functions/classes/variables in different pages, then simply import them into the main page.

you can use This

Or if you want several pages, then you can still import them in a similar way:

ld1 = {import:load-q}

and in html code panel:

<script>
  [ld1()]
</script>

::: spoiler •


Additional :::

iglais@lemmy.world · 2 pts · 164d

thank you. i'm just trying to figure this all out.