All Projects → choucrifahed → sbt-elm

choucrifahed / sbt-elm

Licence: MIT license
Scala Build Tool (SBT) plugin for the Elm programming language

Programming Languages

scala
5932 projects
elm
856 projects

Projects that are alternatives of or similar to sbt-elm

sbt-sass
A fork of the sbt-sass repository which seems to be abandoned.
Stars: ✭ 32 (-27.27%)
Mutual labels:  sbt, sbt-plugin, sbt-web
sbt-findbugs
FindBugs static analysis plugin for sbt.
Stars: ✭ 47 (+6.82%)
Mutual labels:  sbt, sbt-plugin
sbt-graphql
SBT plugin to generate and validate graphql schemas written with Sangria
Stars: ✭ 94 (+113.64%)
Mutual labels:  sbt, sbt-plugin
sbt-kubeyml
Sbt plugin to help deploy Scala applications to Kubernetes
Stars: ✭ 37 (-15.91%)
Mutual labels:  sbt, sbt-plugin
xsbt-webstart
A Webstart plugin for sbt
Stars: ✭ 12 (-72.73%)
Mutual labels:  sbt, sbt-plugin
sbt-sonar
An sbt plugin which provides an easy way to integrate Scala projects with SonarQube.
Stars: ✭ 62 (+40.91%)
Mutual labels:  sbt, sbt-plugin
sbt-swagger-2
sbt plugin for generating Swagger JSON schemas during build
Stars: ✭ 13 (-70.45%)
Mutual labels:  sbt, sbt-plugin
Sbt Fresh
sbt-plugin to create an opinionated fresh sbt project
Stars: ✭ 229 (+420.45%)
Mutual labels:  sbt, sbt-plugin
sbt-travisci
An sbt plugin to integrate with Travis CI
Stars: ✭ 44 (+0%)
Mutual labels:  sbt, sbt-plugin
chuckwagon
a Scala/sbt AWS Lambda Toolkit
Stars: ✭ 29 (-34.09%)
Mutual labels:  sbt, sbt-plugin
sbt-example
Run Scaladoc as unit tests
Stars: ✭ 30 (-31.82%)
Mutual labels:  sbt, sbt-plugin
sbt-babel
An SBT plugin to perform Babel compilation.
Stars: ✭ 12 (-72.73%)
Mutual labels:  sbt, sbt-plugin
sbt-ghpages
git, site and ghpages support for sbt projects.
Stars: ✭ 94 (+113.64%)
Mutual labels:  sbt, sbt-plugin
sbt-bazel
Easily convert SBT projects to Bazel workspaces
Stars: ✭ 55 (+25%)
Mutual labels:  sbt, sbt-plugin
Sbt Dynver
An sbt plugin to dynamically set your version from git
Stars: ✭ 243 (+452.27%)
Mutual labels:  sbt, sbt-plugin
gatling-sbt-plugin
Gatling Plugin for SBT
Stars: ✭ 105 (+138.64%)
Mutual labels:  sbt, sbt-plugin
Sbt Dependency Check
SBT Plugin for OWASP DependencyCheck. Monitor your dependencies and report if there are any publicly known vulnerabilities (e.g. CVEs). 🌈
Stars: ✭ 187 (+325%)
Mutual labels:  sbt, sbt-plugin
Sbt Tpolecat
scalac options for the enlightened
Stars: ✭ 227 (+415.91%)
Mutual labels:  sbt, sbt-plugin
sbt-rewarn
Make sbt always display compilation warnings, even for unchanged files.
Stars: ✭ 42 (-4.55%)
Mutual labels:  sbt, sbt-plugin
sbt-project-switcher
A sbt plugin to switch project in a snappy way⚡️
Stars: ✭ 36 (-18.18%)
Mutual labels:  sbt, sbt-plugin

sbt-elm

sbt-elm is a Scala Build Tool (SBT) plugin that integrates Elm projects in Scala/Play projects. It uses and follows the conventions of sbt-web.

Usage

To use a stable release, add the following to the project/plugins.sbt of your project: If you are using Elm 0.18:

addSbtPlugin("io.finstack" % "sbt-elm" % "0.1.3")

If you are using Elm 0.19:

addSbtPlugin("io.finstack" % "sbt-elm" % "0.2.0")

To use the latest from Github, add the following to the project/plugins.sbt of your project:

lazy val root = project.in(file(".")).dependsOn(sbtElm)
lazy val sbtElm = uri("https://github.com/choucrifahed/sbt-elm.git")

Then:

  • Put your Elm files (with extension elm into src/main/assets/elm)
  • Run the elmMake task
  • Result is in target/web/public/main/js

Or in a Play Framework project:

  • Put your Elm files (with extension elm into app/assets/elm)
  • Run Play
  • Observe the JS file on http://localhost:9000/assets/elmMain.js

There are other tasks available:

  • elmReactor task allows you to run Elm Reactor from SBT.
  • elmRepl task will run the Elm interpreter, with your sources loaded.

However, Elm Package is not yet available from SBT to install packages, bump versions or publish your packages.

Multimodule Play project

Unfortunately, the current version of the plugin does not support multiple Play sub-modules. Therefore you can only have SbtElm enabled for a single module (see #2 for more details). The example below shows how to do this:

// in project/plugins.sbt: addSbtPlugin("io.finstack" % "sbt-elm" % "x.y.z")

// then in build.sbt

lazy val playModuleElm = project
  .in(file("playModuleElm"))
  .enablePlugins(PlayScala)
  ...

lazy val playModule2 = project
  .in(file("playModule2"))
  .enablePlugins(PlayScala)
  .disablePlugins(SbtElm)
  ...

Examples

Check the examples folder for example projects that use this plugin.

Adding arguments to elmMake

This setting for example enables the debugger (Elm 0.18+)

(ElmKeys.elmOptions in ElmKeys.elmMake in Assets) ++= Seq("--debug")

Hacking on the plugin

Run scripted to run the plugin test suite (which is barely existent at this point...)

Special Thanks

To the team behind sbt-purescript for heavily inspiring this plugin.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].