如何在 Build.scala 文件中使用“%%%" [英] How to use '%%%' in a Build.scala file

查看:46
本文介绍了如何在 Build.scala 文件中使用“%%%"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经熟悉在 build.sbt 文件中使用 '%%%' 运算符,但我不明白如何在 build.scala 文件中使用它.我收到以下错误:

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._

推荐答案

从 Scala.js 0.6.23 开始,您需要以下导入:

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

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

<小时>

Scala.js 的旧答案 <0.6.23:


Old answer for Scala.js < 0.6.23:

此处所述,适当的导入是

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

这篇关于如何在 Build.scala 文件中使用“%%%"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆