DanielXMoore / Civet

A TypeScript superset that favors more types and less typing
https://civet.dev
MIT License
1.55k stars 33 forks source link

Run `<script type="text/civet">` in browser build #1400

Closed edemaine closed 2 months ago

edemaine commented 2 months ago

Similar to CoffeeScript, added support for automatically running <script type="text/civet"> code that appears in the HTML that loads the browser build of Civet.

The new source/browser.civet in general allows us to add code specific to the browser build.

I renamed source/browser.civet to source/browser-shim.civet but the diff doesn't show it that way.

Motivation: Easy to run Civet in online sandboxes without any build tools.