lihaoyi / workbench-example-app

An example application written in ScalaJS using scala-js-dom and scala-js-workbench
204 stars 109 forks source link

build.sbt with multiple project format #32

Closed raul782 closed 8 years ago

raul782 commented 8 years ago

When loading the project with IntelliJ it highlights in red the enablePlugin statement.

Wouldn't it be better to use the multi-project format which is now the recommended way.

import com.lihaoyi.workbench.Plugin._
import sbt.Keys._

workbenchSettings

lazy val example = (project in file("."))
  .enablePlugins(ScalaJSPlugin)
  .settings(
    name := "Example",
    version := "0.1-SNAPSHOT",
    scalaVersion := "2.11.7",
    libraryDependencies ++= Seq(
      "org.scala-js" %%% "scalajs-dom" % "0.8.2",
      "com.lihaoyi" %%% "scalatags" % "0.5.4"
    )
  )

updateBrowsers <<= updateBrowsers.triggeredBy(fastOptJS in Compile)

bootSnippet := "example.ScalaJSExample().main(document.getElementById('canvas'));"