treeform / fidget

Figma based UI library for nim, with HTML and OpenGL backends.
MIT License
762 stars 32 forks source link

No html file generated #172

Open AmjadHD opened 2 years ago

AmjadHD commented 2 years ago

When running nim js areas.nim, I only get a js file, no html.

levovix0 commented 2 years ago

It is a normal nim compiler behavior, aren't it?

AmjadHD commented 2 years ago

First cd to each folder then run js compile command then open the .html file in a browser

I guess I mistakenly thought it would generate a .html for me. how would a minimal html file that runs this look like ?

levovix0 commented 2 years ago

something like

<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Fidget example</title>
</head>
<body>
  <script src="areas.js"></script>
</body>
</html>
treeform commented 2 years ago

That is correct Nim does not generate HTML files. You got to make a minimal one yourself.

Closing this issue, feel free to reopen if you still have questions.

jyapayne commented 2 years ago

@treeform this is an issue with the README. It says:

First cd to each folder then run js compile command then open the .html file in a browser.

So you'd think there would be an html file. Maybe it would be helpful to just add that bit of html above to the doc to make it a bit easier on newcomers?

treeform commented 2 years ago

You right its probably is my issue. If you follow the emscriten process it generates the html file, if you follow the simple nim js it does not. I need to figure out the best way to do this.