Skip to content
This repository has been archived by the owner on Apr 22, 2020. It is now read-only.

Adds syntax to make easier the use of command aliases #270

Merged
merged 1 commit into from
Apr 28, 2017

Conversation

juanpedromoreno
Copy link
Member

This PR brings some syntax helpers to make easier the use of command aliases.

For example, given this list of command aliases:

val commandAliases: Seq[Def.Setting[_]] =
    addCommandAlias("validate", ";clean;validateJS;validateJVM") ++
      addCommandAlias("validateDocs", List("docs/tut", "readme/tut", "project root").asCmd) ++
      addCommandAlias("validateCoverage", ";coverage;validate;coverageReport;coverageOff") ++
      addCommandAlias("validateJVM", List(
        "m1JVM/compile",
        "m2JVM/compile",
        "m1JVM/test",
        "m2JVM/test",
        "project root").asCmd) ++
      addCommandAlias("validateJS", List(
        "m1JS/compile",
        "m2JS/compile",
        "m1JS/test",
        "m2JS/test",
        "project root").asCmd)

Basically, asCmd will convert the module/command into: ;project module;command.

Hence, you could define orgScriptTaskListSetting setting safely in this way:

orgScriptTaskListSetting := List(
        orgValidateFiles.asRunnableItem,
        "validateDocs".asRunnableItemFull,
        "validateCoverage".asRunnableItemFull
      )

Copy link
Contributor

@fedefernandez fedefernandez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@juanpedromoreno juanpedromoreno merged commit 466b57e into master Apr 28, 2017
@juanpedromoreno juanpedromoreno deleted the jp-adds-command-aliases-syntax branch April 28, 2017 14:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants