How to use '%%%' in a Build.scala file

二次信任 提交于 2019-12-24 12:13:40

问题


I'm getting familiar with using the '%%%' operator in a build.sbt file, but I don't understand how to use it in a build.scala file. I'm getting the following error:

value %%% is not a member of String

I'm guessing that I have to import the %%% somehow but I don't see how. I tried the following:

import org.scalajs.sbtplugin.ScalaJSPlugin._
import ScalaJSKeys._

回答1:


Edit: Since Scala.js 0.6.23, you need the following import:

import org.portablescala.sbtplatformdeps.PlatformDepsPlugin.autoImport._

Old answer for Scala.js < 0.6.23:

As documented here, the appropriate imports are

import org.scalajs.sbtplugin.ScalaJSPlugin
import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport._


来源:https://stackoverflow.com/questions/28815281/how-to-use-in-a-build-scala-file

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!