sbt 中的单个冒号是什么意思(在两个命令之间) [英] what does a single colon mean in sbt (between two commands)

查看:51
本文介绍了sbt 中的单个冒号是什么意思(在两个命令之间)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用 sbt 的 .travis.yml 文件中,我看到了这个

In a .travis.yml file using sbt, I see this

script:
  - sbt ++$TRAVIS_SCALA_VERSION test:fastOptJS test:fullOptJS

在 sbt 中,我可以运行 test,我可以运行 fastOptJS .它们之间的单个冒号有什么作用?

In sbt, I can run test, and I can run fastOptJS . What does the single colon between them do?

在 travis 中,可以运行一系列命令吗?IE.test:fastOptJS 后面跟着 test:fullOptJS 是什么意思?

In travis, can one run a sequence of commands? ie. what does it mean for test:fastOptJS to be followed by test:fullOptJS?

推荐答案

在 sbt 中,我可以运行 test,我可以运行 fastOptJS .它们之间的单个冒号有什么作用?

In sbt, I can run test, and I can run fastOptJS . What does the single colon between them do?

test:fastOptJS 表示 test 范围内的 fastOptJS.混淆来自于测试范围和测试任务在 sbt 的 shell 中都是 test.

test:fastOptJS means fastOptJS in test scope. The confusion comes from the fact that the test scope and the test task are both test in sbt's shell.

顺便说一句,这在 sbt 1.1 的新统一斜杠语法"中得到了修复,其中测试范围现在是 Test,所以 test:fastOptJS 现在是 测试/fastOptJS.

This, btw, is fixed in sbt 1.1's new "unified slash syntax" where the test scope now Test, so test:fastOptJS is now Test / fastOptJS.

在 travis 中,可以运行一系列命令吗?IE.test:fastOptJS 后面跟着 test:fullOptJS 是什么意思?

In travis, can one run a sequence of commands? ie. what does it mean for test:fastOptJS to be followed by test:fullOptJS?

是的,您可以运行一系列命令.

Yes you can run a sequence of commands.

sbt ++$TRAVIS_SCALA_VERSION test:fastOptJS test:fullOptJS 表示运行++$TRAVIS_SCALA_VERSION(改变scalaVersion),然后test:fastOptJS 然后 test:fullOptJS.

sbt ++$TRAVIS_SCALA_VERSION test:fastOptJS test:fullOptJS means run ++$TRAVIS_SCALA_VERSION (which changes scalaVersion), then test:fastOptJS then test:fullOptJS.

这篇关于sbt 中的单个冒号是什么意思(在两个命令之间)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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