Just like how create-vite (running npm create vite) scaffolds a web app with the framework of your choice, create-gleam scaffolds a web app using Gleam and TypeScript.
$ npm create gleam (or pnpm / yarn)
Features include,
- Vite (bundling, minification, plugins, dev server)
- TypeScript support (customizable to any lang that compiles to JS)
- Importing of Gleam files from TS/JS
- basically if gleam can do it and it's written in JS, it can be done
Currently it's a work in progress and there is only one template which just uses typescript and gleam to create an app but later I am planning on add a couple more such as:
- create a gleam library template using (optionally) TypeScript and allowing the use of node packages which will be bundled in the library
- potentially look on https://packages.gleam.run to see what frameworks/framework bindings are there and create templates for that.
- tailwind bundled and minified without a cdn
The template is pretty customizable right now. What ever one could do with Vite should be possible with it.
also I'm hoping in the future I can figure out how to get type information from the generated .d.ts files when importing from a .gleam file