• Stars
    star
    110
  • Rank 316,770 (Top 7 %)
  • Language
    Scala
  • Created about 9 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Scala.js bindings for Vue.js and an example application

scalajs-vue Logo

scalajs-vue

Scala.js bindings for Vue.js and an example application

To use as a library, just pull in from

https://jitpack.io/#fancellu/scalajs-vue

Build Status

Example app showing the use of Scala.js with Vue.js The bindings for Vue.js are in com.felstar.scalajs.vue

Get started

To get started, run sbt ~fastOptJS in this example project.

Obviously you need to have SBT installed.

This should download dependencies and prepare the relevant javascript files. It then kicks off a web server to serve the html and JS files.

If you open localhost:12345/target/scala-2.12/classes/index-dev.html in your browser, it will show you a sample app, doing various bindings and Scala code. Its not meant to be pretty, simply instructive. Do open the Console to see debug messages.

Demo

live demo

Development

If you change your source HTML (inside /src/main/resources) or Scala (inside /src/main/scala/example/Todo.scala, sbt will recompile as needed. You then just have to refresh the page to see the new version. Hopefully having an example application will make it clearer on how to use Vue from Scala, i.e. monkey see, monkey do.

The optimized version

Run sbt fullOptJS and open up index-opt.html for an optimized version of the final application, useful for final publication. You may well need to copy over index-dev.html to get your latest changes. Be sure to refer to the correct JS as well, as it will have a different name than the fast compiled version. e.g.

<script type="text/javascript" src="../scala-js-vue-js-example-opt.js"></script>

Status

This is just a quick proof of concept and some bindings for those wanting to use Vue.js from Scala.js. Feel free to get in contact with any issues etc.

More Repositories

1

zio-restful-webservice

ZIO 2.0 Restful webservice example using zio, zio-http, zio-json, quill, H2, twirl, zio-streams, zio-cache, zio-logging, zio-actors, zio-spark, openai, DallE
Scala
58
star
2

xqs

XQuery for Scala
Scala
34
star
3

jmsScala

JMS for Scala
Scala
19
star
4

neo4j-d3v4

Neo4j 3.x accessed via bolt JS driver, plugged into D3 v4 force simulation
JavaScript
16
star
5

scalajs-leaflet

Scala.js bindings for Leaflet.js and example applications
Scala
12
star
6

http4s-circe-example

Example of http4s server with various endpoints
Scala
12
star
7

scalajs-ractive

Scala.js bindings for Ractive.js and an example application
Scala
9
star
8

scalajs-flot

Scala.js bindings for Flot and example applications
Scala
9
star
9

scalajs-velocity

Scala.js bindings for Velocity.js and example applications
HTML
8
star
10

sbt-docker-helloworld

Simple sbt-native-plugin docker hello world example plus docker-compose example
Scala
8
star
11

graphx-citymap

CityMap coding test plus 3 solutions, 1 with Spark/GraphX
Scala
8
star
12

scala-sam-app

Simple Scala AWS SAM App
Scala
6
star
13

spark-streaming-examples

A few Spark Streaming examples
Scala
5
star
14

http4s-db-example

http4s + H2 + Doobie + Quill + flywaydb + Cats Effect example
Scala
5
star
15

fs2-examples

A few fs2+zio examples (streaming file io, moving average, queue example, echo server, REPL)
Scala
5
star
16

twicsy-downloader

Batch downloader for http://twicsy.com
Scala
4
star
17

dispatch-maven-prototype

A simple Scala Maven prototype for the Dispatch Async Http Client Library
Scala
4
star
18

kafkastreams

Kafka streams Scala example, using docker
Scala
3
star
19

langChainDemo

Lots of little applications showing langchain at work
Python
3
star
20

spray-client-maven-prototype

Spray Client Maven Prototype
Scala
3
star
21

scriptEngineManager-example

Some examples of using javascript and scalascript from Scala
Scala
3
star
22

Finagle-postgres-example

Finagle + Postgres + Doobie + Quill + pureconfig + flywaydb
Scala
3
star
23

ecommerce-react

Example react shopping app with Node.js, React, React Router, Redux, Firebase, Reselect
JavaScript
3
star
24

xccScala

Marklogic XCC for Scala
Scala
3
star
25

openai-scala-models

A collection of case classes that work against the OpenAI API
Scala
3
star
26

GroupFinder

A simple piece of utility code to take a List and group its elements based on List membership, whilst returning unmatching elements, without unnecessary changing of order, via Group case class
Scala
3
star
27

zio-intro-examples

Some intro code to help with understanding ZIO 1.x
Scala
2
star
28

VHDL_Basys3_PWM_7_Segment

Basys 3 FPGA with 7 segment display, switch and led
VHDL
2
star
29

play-react

Example play project with React and material-ui, without node.js
HTML
2
star
30

scalafx-http4s-circe-example

ScalaFX example with http4s client talking to a json endpoint along with Circe
Scala
2
star
31

scala-ssh-server-example

Shows you how to embed a pure jvm ssh server or client
Scala
2
star
32

store-actor

A simple Scala AKKA Actor to store elements of type parameter
Scala
2
star
33

play-vue-quasar

Play 2.7 with Vue2 and Quasar, axios, showing a rich UI, no node.js
CSS
2
star
34

play-openhtmltopdf

Scala play example of creating a PDF from a Twirl view
Scala
2
star
35

game-hub

GameHub: React + Chakra UI Game Browser
TypeScript
2
star
36

akka-http-images

Serves up an image on the /image endpoint, with the left hand side distorted pixel by pixel, by some random amount to each r,g,b value
Scala
2
star
37

docker-expressnodejs

Example nodejs express web server, inside Docker
JavaScript
2
star
38

docker-composenoderedis

A nodejs express web app talking to Redis inside Docker, via docker-compose
JavaScript
2
star
39

ip2country

Reads in each IP, lookup for country, print out iso_code and country name, plus ip count per country
2
star
40

play-monix-cats

Example Play application using Monix, Circe, Cats
Scala
2
star
41

bmi_calculator_flutter

Little BMI Calculator demo in Flutter
C++
2
star
42

docker_rust

Tiny Rust application to show Rust running inside Docker. Uses Alpine image, for 11.4 mb image
Dockerfile
2
star
43

cats-actors-examples

Cats Effect Actors examples with cats-actors
Scala
2
star
44

kotlin-jetpack-calculator

Kotlin Jetpack Compose Calculator app
Kotlin
2
star
45

cats-effect-decline-example

Cats effect Decline (Composable command-line parsing for Scala) example
Scala
2
star
46

zio-cli-demo

A simple demo application to show zio-cli in action
Scala
2
star
47

play-security-example

A couple of examples of play endpoint security, basic authentication and form based
Scala
1
star
48

github-searcher

Example Scala code showing processing of JSON repo data from Github
Scala
1
star
49

quizzler_flutter

A little quiz app in Flutter
C++
1
star
50

play-sttp-examples

Some examples of using sttp "the Scala HTTP client you always wanted!" plus usage of Tor socks proxy
Scala
1
star
51

cucumber-scala-example

Shows usage of cucumber-scala dsl from sbt
Scala
1
star
52

streamlit_local_llm

Example streamlit UI to talk to a local llm (for instance run via lm studio)
Python
1
star