Skip to content

gleam-br/vite-plugin-gleam

Repository files navigation

🚀 Gleam plugin to vite runtime.

Gleam language plugin to vitejs.

🌸 Options

Vite config vite.config.js:

import { resolve } from "vite";
import { defineConfig } from "vite";

// type to plugin options
import gleam from "vite-plugin-gleam";
import {type GleamPlugin} from "./src/project";

export default defineConfig({
  plugins: [
    // gleam plugin options
    gleam({
      // gleam root dir project
      cwd: ".", // process.cwd() is default
      // gleam binary path
      bin: "gleam",
      log: {
        // "info" | "debug" | "trace" | "none"
        level: "info",
        // if put date and time
        time: true
      },
      build: {
        // gleam build arg to break on warnings
        warningsAsErrors: true,
        // gleam build arg to show or not cmd output
        noPrintProgress: false
      }
    } as GleamPlugin)
  ],
  resolve: {
    alias: {
      // vite aliases to gleam build dir
      '@gleam': resolve(__dirname, "./build/dev/javascript")
    }
  }
})

🧪 Demo

🌄 Roadmap

  • Unit tests
  • More docs
  • GH workflow
    • test
    • build
    • changelog & issue to doc
    • auto publish manual publish
      • npm publish
  • Pure gleam code

Thanks & Acknowledgements

About

Gleam plugin to vite runtime.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors