Scala.js in your NPM as a CLI app. Easy to publish!
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
lib
project
src/main/scala
.gitignore
.npmignore
.scalafmt.conf
.travis.yml
README.md
build.sbt
package.json

README.md

Scala.js CLI demo Build Status

Publish Scala.js apps through NPM

NPM

Rationale

Most likely, you've never ran a Scala CLI app, let alone a Scala.js CLI app.

But more likely you have ran Node.js CLI apps. This is because it is super easy to publish your own CLI application through the NPM repository.

On the other hand. publishing Scala apps is not the easiest thing in the world. I want to get the best of both worlds: an excellent programming language and an excellent lightweight distribution channel.

Here's a demo to show you that it is possible.

It includes the use of the Scala.js Node.js strong-typed API by Lawrence Daniels.

Forks

Usage

Use the pre-built npmjs package.

$ npm install -g scalajs-cli-demo
$ scalajs-cli-demo
Hello world from Scala!
----
To demonstrate we're in Node, here's some of your environment:
PATH = /home/...

Development

I recommend IntelliJ IDEA.

To iterate, inside SBT run:

> ~run

or:

> ~test

Publishing

Requires SBT.

$ npm publish