metamorphosis
    Preparing search index...

    Function writeTheme

    • Write theme variables to get autocomplete while developing. Only works from node.

      // src/bin/generateThemeVars.ts

      import { theme } from "../theme.js" // import theme instance
      import { writeTheme } from "metamorphisis/node/writeTheme.js"

      // write relative to file
      writeTheme(theme, import.meta.url, "../assets/variables.scss")

      In package.json:

      "scripts": {
      "gen:theme": "pnpm ts-node src/bin/generateThemeVars.ts"
      }

      Parameters

      • theme: Theme
      • metaUrl: string
      • filepath: string

      Returns Promise<void>

      node