8000 GitHub - reedho/scittle: Execute Clojure(Script) directly from browser script tags via SCI
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
/ scittle Public
forked from babashka/scittle

Execute Clojure(Script) directly from browser script tags via SCI

License

Notifications You must be signed in to change notification settings

reedho/scittle

 
 

Repository files navigation

About this branch

This branch, daslu/scittle emmy_viewers_dev1 branch, was forked from reedho/scittle my_playground branch, that was forked from babashka/scittle main branch.

It offers the drafts of Scittle plugins for Emmy and Emmy-Viewers.

The plugins are under plugins/emmy and plugins/emmy_viewers.

A work in progress demo of these plugins is at reedho/scittle-emmy-viewers-demo repo, which is published to https://ev-demo.datafy.id/.

TODO

  • Make all of Emmy-Viewers work.
  • Package css links as part of the plugin (currently we directly link them it from the example HTML below).
  • Figure out how to package the plugin as a library for recommended use.
  • Figure out the reason for some strange characters that make the Emmy-Viewers cljs break in Scittle (currently we remove them in the build process). [Fixed]

Usage

To try the plugins out, we will need some aditional setup, as demonstrated in plugins/demo_emmy. Here is how to use it:

cd plugins/demo_emmy
npm install
bb release
cd resources/public
python -m http.server

Then, you may browse localhost:8000 and edit plugins/emmy/resources/public/index.html and plugins/emmy/resources/public/example.cljs.

Scittle

The Small Clojure Interpreter exposed for usage in script tags.

Try it out on CodePen!

See Github pages for usage.

See babashka-scittle-guestbook for a minimal full stack web application.

See releases for links to JSDelivr to get versioned artifacts.

Serving assets

To serve assets you can use the babashka.http-server dependency (with babashka or Clojure JVM):

(require '[babashka.http-server :as http])
(http/serve {:port 1341 :dir "resources/public"})
@(promise) ;; wait until process is killed

nREPL

See doc/nrepl.

Tasks

Run bb tasks to see all available tasks:

$ bb tasks
The following tasks are available:

clean   Start from clean slate.
dev     Development build. Starts webserver and watches for changes.
prod    Builds production artifacts.
release Updates Github pages with new release build.

Credits

Idea by Arne Brasseur a.k.a plexus.

License

Copyright © 2021 - 2022 Michiel Borkent

Distributed under the EPL License. See LICENSE.

About

Execute Clojure(Script) directly from browser script tags via SCI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Clojure 56.2%
  • HTML 42.9%
  • Other 0.9%
0