Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/scalawilliam/scalajs-cli-demo
Scala.js in your NPM as a CLI app. Easy to publish!
https://github.com/scalawilliam/scalajs-cli-demo
javascript nodejs npm scala scalajs
Last synced: 22 days ago
JSON representation
Scala.js in your NPM as a CLI app. Easy to publish!
- Host: GitHub
- URL: https://github.com/scalawilliam/scalajs-cli-demo
- Owner: ScalaWilliam
- Created: 2017-05-10T01:26:07.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-03-14T13:05:13.000Z (over 3 years ago)
- Last Synced: 2024-10-14T01:02:18.562Z (24 days ago)
- Topics: javascript, nodejs, npm, scala, scalajs
- Language: Scala
- Homepage:
- Size: 8.79 KB
- Stars: 12
- Watchers: 3
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Scala.js CLI demo [![Build Status](https://travis-ci.org/ScalaWilliam/scalajs-cli-demo.svg?branch=master)](https://travis-ci.org/ScalaWilliam/scalajs-cli-demo)
> Publish Scala.js apps through NPM
[![NPM](https://nodei.co/npm/scalajs-cli-demo.png?compact=true)](https://nodei.co/npm/scalajs-cli-demo/)
## 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](https://github.com/scalajs-io/nodejs)
by [Lawrence Daniels](https://github.com/ldaniels528).## Forks
* https://github.com/actionfps/actionfps-clone-logs - combine ScalaJS & EventSource to synchronise logs from HTTP to file.## 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 & for you to be logged in on NPM.```
$ npm publish
```