itβs a dependency issue
hey @flyboarder, you have a minute to help me sort out how to get shadow's built in web server to serve up a hoplon app that doesn't use *.hl file nor (page) macro?
yep
I am working on a project like that right now
oh, cool. So I'm just getting nada. Not sure what port to use, nor how to tell shadow's ws what the main function is
Can I see your configuration file?
package.json:
{
"name": "guardian-dashboard",
"version": "3.3.2",
"description": "UI to JBOG guardian server",
"main": "guardian/dashboard.js",
"directories": {
"doc": "doc"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+<https://github.com/vigilancetech-com/guardian-dashboard.git>"
},
"author": "Jessie Umblerg/Kevin Haddock",
"license": "ISC",
"bugs": {
"url": "<https://github.com/vigilancetech-com/guardian-dashboard/issues>"
},
"homepage": "<https://github.com/vigilancetech-com/guardian-dashboard#readme>",
"dependencies": {
"markdown": "^0.5.0",
"npm": "^6.4.1",
"util": "^0.11.0"
}
}
actually the shadow-cljs.edn
yeah, was getting that next π
;; shadow-cljs configuration
{:source-paths
["src"]
:dependencies
[
[binaryage/devtools "0.9.10"]
[adzerk/env "0.3.1" :scope "test"]
[com.rpl/specter "1.1.1"]
[hoplon/hoplon "7.3.0-SNAPSHOT"]
[cljsjs/markdown "LATEST"]
[vigilancetech/ui "0.3.0-SNAPSHOT"]
]
:builds
{:app { :target :browser
:compiler-options {:language-in :ecmascript5-strict }
:output-dir "public/assets/app/js"
:asset-path "/assets/app/js"
;; :build-hooks [(build.hop/foo)]
:modules {:main {:entries [guardian.dashboard]}}}}}
ah ok π
but my feeling is I'm needing to grok how to config the package.json to tell it where main is
that's why I put it out first
:devtools {:http-root "public"
:http-port 8080}
in your build for shadow
k
that should go right under the app build with :target :browser and all that?
yeah like after :modules
map
ok
trying it now
you will still need an html file
yeah, I put that in public/
so you should be good to go then, the contents of that point to your js files I assume
as an aside here, I seem to be getting multiple instances of shadow's compile server when I'm working on multiple projects at the same time. Have you noticed that?
yeah, I'm assuming the script tag in my index.html is supposed to have a relative path to my main.js (or index.html.js IIRC)?
YES! Looks like its trying to load! Broken images tho, so I just gotta figure out where to copy them to. Thanks for that!
no problem!
yeah there should be one server per project, so it will depend on where you run the library from
hmm... too bad they won't share a JVM. Seems to take almost a gig of resident memory for each π
ouch
yeah, rough when you're working on an old POS computer w/only 4g!