scittle README

项目的 README,来自 github.com/babashka/scittle。合并为一个 markdown 文件:README.md。

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.

Service worker

See doc/serviceworker.md.

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. Name by Alessandra Sierra (the name occurs first in this blog post).

License

Copyright © 2021 - 2022 Michiel Borkent

Distributed under the EPL License. See LICENSE.

scittle (babashka/scittle)

正在搜索数据库…

这是什么?Scittle 是“面向 script 标签使用的小型 Clojure 解释器”,基于 SCI 构建。它可以直接在浏览器的 script 标签中运行 Clojure 和 ClojureScript 代码。
它是框架还是库?它是一个库。你通过 script 标签把它加载到 HTML 页面中,页面上的 Clojure 代码会直接在浏览器里执行。
怎么让它跑起来?在你的 HTML 页面中引入一个从 JSDelivr 获取的、带版本号的 Scittle 脚本,然后在 script 标签里编写 Clojure 代码。发布页面列出了各个链接,GitHub Pages 站点提供了使用示例。
除了浏览器,还需要别的东西吗?对于在浏览器中运行的页面,不需要。若要在本地提供静态资源,则要使用 babashka.http-server 依赖,它可以配合 babashka 或 Clojure JVM 使用。
它会把我的 Clojure 编译成 JavaScript 吗?不会,它是解释执行的。SCI 在浏览器中于运行时对你的代码求值,因此最适合小型脚本和快速试验。
许可证方面有什么需要注意的吗?它以 EPL-1.0 许可证发布(Eclipse Public License),版权归 Michiel Borkent 所有。
有没有可以参考的完整示例应用?有。babashka-scittle-guestbook 是一个使用 Scittle 构建的精简全栈 Web 应用。
不做任何设置就能试用吗?可以。README 中提供了一个 CodePen 演示,你可以直接在浏览器中试用 Scittle。
有哪些类似的项目?clojure, dquickts, mquickjs, scala, pyodide, penpot, lowdb, php-src
作者
babashka
大小
7.1 MB
星标
447
时长
5年
提交 · 90 天