Giter Site home page Giter Site logo

takezoe / scala-cli Goto Github PK

View Code? Open in Web Editor NEW

This project forked from virtuslab/scala-cli

0.0 2.0 0.0 5.38 MB

Home Page: https://scala-cli.virtuslab.org

License: Apache License 2.0

Shell 3.30% Scala 88.60% Java 1.41% Batchfile 0.51% JavaScript 3.21% CSS 0.25% Dockerfile 0.07% SCSS 2.65%

scala-cli's Introduction

scala-cli

Build status Maven Central

Scala CLI is an experimental tool to run/compile/test Scala that aims at being a better scala command. It shares some similarities with build tools, but doesn't aim at supporting multi-module projects, nor to be extended via a task system.

User-facing documentation can be found on our website: scala-cli.virtuslab.org.

Developer docs

Requirements

Building Scala CLI requires:

  • a JVM (>= 8)

The Scala CLI sources ship with Mill launchers, so that Mill itself doesn't need to be installed on your system.

Common commands

Running the CLI from sources

./mill -i scala …arguments…

Run unit tests

./mill 'build[_].test'

Run integration tests with the JVM launcher

./mill integration.jvm.test

Filter test suites with

./mill integration.jvm.test 'scala.cli.integration.RunTests.*'
./mill integration.jvm.test 'scala.cli.integration.RunTests.Multiple scripts'

Run integration tests with the native launcher

(generating the launcher can take several minutes)

./mill integration.native.test

Generate native packages

Build native packagers:

  • deb for linux
  • msi for windows
  • dmg and pkg for macOS

(generating native packager for specified format)

./mill -i scala package ..arguments... --deb --output 'path.deb'
./mill -i scala package ..arguments... --dmg --output 'path.dmg'
./mill -i scala package ..arguments... --pkg --output 'path.pkg'

Generate Metals configuration files

./mill mill.contrib.Bloop/install

Then run the command "Metals: Connect to build server".

(Recommended over the Metals import project functionality.)

Whenever the build is updated, just do these two steps again.

Generate IntelliJ configuration files

./mill mill.scalalib.GenIdea/idea

Then open the scala-cli directory in IntelliJ.

(Recommended over the IntelliJ import project functionality.)

Whenever the build is updated, run the command above again. IntelliJ should then pick up the new changes.

Generate a native launcher

./mill -i show cli.nativeImage

This prints the path to the generated native image. The file named scala at the root of the project should also be a link to it. (Note that the link is committed and is always there, whether the files it points at exists or not.)

Generate a JVM launcher

./mill -i show cli.launcher

This prints the path to the generated launcher. This launcher is a JAR, that directly re-uses the class directories of the modules of the project (so that cleaning up those classes will break the launcher). If this is a problem (if you wish to run the launcher on another machine or from a Docker image for example), use a native launcher (see above) or a standalone JVM one (see below).

Generate a standalone JVM launcher

./mill -i show cli.standaloneLauncher

This prints the path to the generated launcher. This launcher is a JAR, that embeds JARs of the scala-cli modules, and downloads their dependencies from Maven Central upon first launch (using the coursier cache, just like a coursier bootstrap).

Website

The Scala CLI website is built with Docusaurus and uses Infima for styling.

Generate the website once

cd website
yarn build
npm run serve

Generate the website continuously

cd website
yarn run start

Scala CLI logos

Package with various logos for scala-cli can be found on google drive

scala-cli's People

Contributors

actions-user avatar adpi2 avatar alexarchambault avatar alvinj avatar baccata avatar bjornregnell avatar ckipp01 avatar dependabot[bot] avatar kacperfkorban avatar kubukoz avatar lwronski avatar marcinaman avatar romanowski avatar sethtisue avatar tpasternak avatar

Watchers

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