Giter Site home page Giter Site logo

sbt-with-elm's Introduction

how to use

  • add ElmCompile to your /project/ folder
  • add enablePlugins(ElmCompile) in your build.sbt
  • change the defaults if needed

what this does

inserts a step into sbt's compilation that compiles elm code and then puts it as a resource into the resulting jar

this also adds elm's sources to sbt's watch triggers, meaning that commands like ~run will actually work (uh, well, read this first though)

what for

to package both front and backend code into one jar

what are the defaults

sbt key description default
elmSrcDirectory elm source root src/main/elm
elmMainFile elm main file (relative to source root) Main.elm
elmOutputFile compiled js location in jar elm/elm.js

what are the requirements

  • elm to be installed and be accessible from your system's terminal

what you can use this for

read through the plugin file if you want to learn one way to make sbt compile your elm/ts/whatever code and put it right into your jar. all in a clean, non-hardcoded, no ".gitignore the compiled junk" way

OR

on continuous compilation

elm sources are added as watch triggers to sbt's compile task. what this means is that when continous compilation is used, changes to elm sources will trigger a recompile (if you've used PlayFramework, it's kind of like its development mode but it also includes elm files)

there is a catch though. sbt will not stop any process that runs continuously, meaning something like a web server (which is probably what you will be using this template for) will not be stopped to be recompiled.

you should use something like sbt-revolver in conjunction with this plugin to continously compile your web server

sbt-with-elm's People

Contributors

tvoklov avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.