Skip to content

srghma/generate-halogen-css-modules

Repository files navigation

generate-halogen-css-modules

Generate FFI for css files ending with .module.css

How it works

having in /home/srghma/projects/purescript-halogen-nextjs/app/Nextjs/Pages/Buttons/CSS.module.css

.myButton {
  color: green;
}

.myButton > a {
  color: green;
}

.myButton2 > a {
  color: green;
}

With command generate-halogen-css-modules --directory /home/srghma/projects/purescript-halogen-nextjs/app

it will generate 2 files

  1. /home/srghma/projects/purescript-halogen-nextjs/app/Nextjs/Pages/Buttons/CSS.js
exports.styles = require('./CSS.module.css')
  1. /home/srghma/projects/purescript-halogen-nextjs/app/Nextjs/Pages/Buttons/CSS.purs
module Nextjs.Pages.Buttons.CSS (styles) where

import Halogen.HTML (ClassName)

foreign import styles ::
  { myButton :: ClassName
  , myButton2 :: ClassName
  }

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published