Stand up stub of npm export
This commit is contained in:
parent
bc7565926a
commit
478d0347f2
24
package.json
24
package.json
|
@ -1,22 +1,14 @@
|
|||
{
|
||||
"name": "ludus",
|
||||
"version": "1.0.0",
|
||||
"description": "![Ludus logo](logo.png) ## Ludus: A friendly, dynamic, functional language",
|
||||
"main": "index.js",
|
||||
"directories": {
|
||||
"doc": "doc",
|
||||
"test": "test"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"name": "@ludus/ludus",
|
||||
"version": "0.1.0-ALPHA",
|
||||
"description": "Ludus: A friendly, dynamic, functional language",
|
||||
"main": "target/js/ludus.js",
|
||||
"directories": {},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"author": "Scott Richmond",
|
||||
"license": "GPL-3.0",
|
||||
"devDependencies": {
|
||||
"shadow-cljs": "^2.26.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"p5": "^1.8.0"
|
||||
}
|
||||
"dependencies": {}
|
||||
}
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
:builds
|
||||
{:node {:target :node-library
|
||||
:output-to "target/js/ludus.js"
|
||||
:exports-fn ludus.core/run
|
||||
:asset-path "/js"
|
||||
:modules {:main {:entries [ludus.core]}}}
|
||||
:exports {:run ludus.node/run}
|
||||
:modules {:main {:entries [ludus.node]}}}
|
||||
:browser {:target :browser
|
||||
:output-dir "target/js"
|
||||
:asset-path "target"
|
||||
|
|
17
src/ludus/node.cljs
Normal file
17
src/ludus/node.cljs
Normal file
|
@ -0,0 +1,17 @@
|
|||
(ns ludus.node
|
||||
; (:require [ludus.interpreter :as i]
|
||||
; [ludus.grammar :as g]
|
||||
; [ludus.parser :as p]
|
||||
; [ludus.scanner :as s])
|
||||
)
|
||||
|
||||
(defn run [source]
|
||||
(println "Running source!")
|
||||
(println "(This is a stub.)")
|
||||
(clj->js {
|
||||
:result "Hello, world!"
|
||||
:errors [{:msg "An error"}, {:msg "Another error"}]
|
||||
:console ["Here's a log.", "Here's another log."]
|
||||
:draw [[:background 0]
|
||||
[:fill 255]
|
||||
[:rect 10 10 50 50]]}))
|
Loading…
Reference in New Issue
Block a user