Coder Social home page Coder Social logo

scala-devcontainer's Introduction

Scala Devcontainer

A VS Code devcontainer to be used for Scala (Version 3) development. The devcontainer includes all required tools and example code as well as tests to get quickly started or try out Scala.

Running the devcontainer

To run the devcontainer, check out the the git repository, open the folder in VS Code and execute the task >Dev Containers: Open Folder in Container....

You can also use GitHub Codespaces to run the devcontainer. On GitHub, open the git repository, click on Code, then Codespaces, and select Create codespace on main.

Using Metals

The Metals extension is installed as part of this devcontainer and is the recommended way to run, test and debug Scala files. To get started, run

>Metals: Import build 

from the VS Code command palette.

Running from the command line

As an alternative to Metals, the sbt build tool is also available from the codespace terminal. To compile the provided Hello World example, run the following command in the VS Code terminal:

$ sbt compile

To execute the resulting program, use the following command:

$ sbt run

Starting a Scala script

Scala can be used to write scripts. If you want to try out using Scala in scripts, you can start with the file scripts.scala. To run the script, run the following command:

$ scala script.scala

Running tests

The devcontainer includes a basic sketch of ScalaTest for unit testing. To run the provided example tests, execute the following command:

$ sbt test

scala-devcontainer's People

Contributors

anvo avatar rothenhouser avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.