hoplon

The :hoplon: ClojureScript Web Framework - http://hoplon.io/
flyboarder 2018-10-15T00:44:01.000100Z

it’s a dependency issue

flyboarder 2018-10-15T00:44:05.000100Z

@vigilancetech ^

vigilancetech 2018-10-15T01:02:07.000100Z

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?

flyboarder 2018-10-15T01:02:19.000100Z

yep

flyboarder 2018-10-15T01:02:42.000100Z

I am working on a project like that right now

vigilancetech 2018-10-15T01:03:08.000200Z

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

flyboarder 2018-10-15T01:04:31.000100Z

Can I see your configuration file?

vigilancetech 2018-10-15T01:05:19.000100Z

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"
  }
}

flyboarder 2018-10-15T01:05:35.000100Z

actually the shadow-cljs.edn

vigilancetech 2018-10-15T01:05:55.000100Z

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]}}}}}

flyboarder 2018-10-15T01:06:10.000200Z

ah ok πŸ‘Œ

vigilancetech 2018-10-15T01:06:38.000100Z

but my feeling is I'm needing to grok how to config the package.json to tell it where main is

vigilancetech 2018-10-15T01:06:48.000100Z

that's why I put it out first

flyboarder 2018-10-15T01:06:58.000100Z

:devtools {:http-root "public"
           :http-port 8080}

flyboarder 2018-10-15T01:07:28.000100Z

in your build for shadow

vigilancetech 2018-10-15T01:07:36.000100Z

k

vigilancetech 2018-10-15T01:08:06.000100Z

that should go right under the app build with :target :browser and all that?

flyboarder 2018-10-15T01:08:25.000100Z

yeah like after :modules map

vigilancetech 2018-10-15T01:08:31.000100Z

ok

vigilancetech 2018-10-15T01:09:02.000100Z

trying it now

flyboarder 2018-10-15T01:09:13.000100Z

you will still need an html file

vigilancetech 2018-10-15T01:10:05.000100Z

yeah, I put that in public/

flyboarder 2018-10-15T01:11:55.000100Z

so you should be good to go then, the contents of that point to your js files I assume

vigilancetech 2018-10-15T01:13:09.000100Z

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?

vigilancetech 2018-10-15T01:14:00.000100Z

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)?

vigilancetech 2018-10-15T01:18:03.000100Z

YES! Looks like its trying to load! Broken images tho, so I just gotta figure out where to copy them to. Thanks for that!

flyboarder 2018-10-15T01:19:12.000100Z

no problem!

flyboarder 2018-10-15T01:19:41.000100Z

yeah there should be one server per project, so it will depend on where you run the library from

vigilancetech 2018-10-15T01:20:36.000100Z

hmm... too bad they won't share a JVM. Seems to take almost a gig of resident memory for each πŸ˜•

flyboarder 2018-10-15T01:23:53.000100Z

ouch

vigilancetech 2018-10-15T01:54:38.000100Z

yeah, rough when you're working on an old POS computer w/only 4g!