Giter Club home page Giter Club logo

workbench-example-app's Introduction

Example Scala.js application

This is a slightly less barebone example of an application written in Scala.js. In particular, it links in libraries that are indispensible in being productive working with Scala.js.

Get started

To get started, run sbt ~fastOptJS in this example project. This should download dependencies and prepare the relevant javascript files. If you open localhost:12345/target/scala-2.11/classes/index-dev.html in your browser, it will show you an animated Sierpinski triangle (live demo). You can then edit the application and see the updates be sent live to the browser without needing to refresh the page.

The optimized version

Run sbt fullOptJS and open up index-opt.html for an optimized (~200kb) version of the final application, useful for final publication.

Dodge the Dots

Take a look at the dodge-the-dots branch in the git repository if you want to see a slightly more complex application that was made in 30 minutes using this skeleton. Similar steps can be used for development or publication. There's a live demo here.

Space Invaders

There's also a space-invaders branch, also made in 30 minutes, with its own live demo.

TodoMVC

The todomvc branch contains an implementation of the TodoMVC example application, which is used to compare how the exact same application would be implemented using different languages and frameworks. This application makes heavy use of Scalatags and Scala.Rx, with heavy use of the DOM via scala-js-dom, making it a good example of how reactive web pages could be built using ScalaJS, as well as use of standalone ScalaJS libraries. live demo

Ray Tracer

The ray-tracer branch contains a simple ray-tracer written using Scala.js, with a live demo.

Weather Map

The mapper branch contains an application that renders a heat map of the earth, using data pulled from OpenWeatherMap, with a live demo

Autowire

The autowire branch contains a small sample client-server application, using Scala.js on the client and Spray on the server. The readme on that branch contains instructions on how to run it.

workbench-example-app's People

Contributors

auxf5 avatar fabianpage avatar lihaoyi avatar sjrd avatar

Watchers

 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.