1.0.1 • Published 6 months ago

scalalumo v1.0.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
6 months ago

Scalalumo

Zero-Runtime Typesafe Vaadin Lumo Utility classes in Scala inspired by scalawind

How to use

Install the CLI, using any node package manager that you prefer:

$ npm install scalalumo --save-dev

Then, add the postinstall script to your package.json to make sure the code will automatically run after install:

"scripts": {
  "postinstall": "scalalumo generate",
}

After generating, you will have a scalalumo.scala file at the root of your project. You can move it to your preferred location and rename the package however you like.

Then, import scalalumo.* and you're ready to go.

import scalalumo.*

div(
  cls := lumo.bgPrimary.mM.shadowM.flex.flexRow
            .md(lumobp.flexCol.text2xl).css,
  ...
)

// ↓ ↓ ↓ ↓ ↓ ↓

<div class="bg-primary m-m shadow-m flex flex-row md:flex-col md:text-2xl">
  ...
</div>

That's it.

Customize Generated Code

The Scalalumo CLI supports -o to specify the output path and -p to specify the generated package name. For example:

$ scalalumo generate -o ./src/main/scala/myapp/scalalumo.scala -p scalalumo
1.0.1

6 months ago

1.0.0

6 months ago

0.3.0

6 months ago

0.2.0

6 months ago

0.1.0

6 months ago