Publish Scala.js apps through NPM
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.
- https://github.com/actionfps/actionfps-clone-logs - combine ScalaJS & EventSource to synchronise logs from HTTP to file.
Use the pre-built npmjs package.
$ npm install -g team-city-upsource-source-bridge
$ team-city-upsource-source-bridge
TeamCityUpsourceSouthBridge
Listening on port 63339
I recommend IntelliJ IDEA.
To iterate, inside SBT run:
> ~run
or:
> ~test
Requires SBT.
$ npm publish