This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-05-06
Channels
- # aws (11)
- # beginners (51)
- # cider (61)
- # cljsrn (37)
- # clojure (51)
- # clojure-spec (5)
- # clojure-uk (6)
- # clojurescript (35)
- # core-async (29)
- # cursive (3)
- # datomic (4)
- # defnpodcast (3)
- # editors (10)
- # emacs (3)
- # fulcro (2)
- # lein-figwheel (9)
- # leiningen (3)
- # mount (3)
- # off-topic (59)
- # parinfer (6)
- # portkey (4)
- # re-frame (6)
- # shadow-cljs (136)
- # spacemacs (1)
- # specter (1)
- # tools-deps (10)
here’s a doozy, does the cljs compiler support an option to spit out not an indexed source map, but an … non-indexed one? (not sure what you call a regular map)
i’m trying to use http://sentry.io, but they don’t seem to support the v3 spec of indexed sourcemaps… so I’m kind of SOL if the compiler can’t spit out a format they support. I guess I could look for tools that converts between the two, but that seems rather fishy.
With this project.clj https://dpaste.de/8jrU I get an error in the console “Uncaught ReferenceError: goog is not defined”
Also, if I try to enable source-maps, they kinda work but I get an error in the console “Uncaught SyntaxError: Unexpected token :”
@skeuomorf Can you share details on some ClojureScript source that causes the error? An ideal minimal repro would use cljs.main
to compile it.
@skeuomorf I can't repro using your project.clj
and that source file in src/playground/core.cljs
and when doing lein cljsbuild once
Cool. If you succeed in doing that, then you could create a JIRA, as clj
is accepted as being "minimal".
I don't see an issue discussing it here; unfortunately others will need to be able to repro it, even with lein-cljsbuild
tried clj --main cljs.main --source-map true --optimizations none -c repro.core
but it opened a repl without compiling the file
@skeuomorf See -co
/ --compile-opts
here https://clojurescript.org/reference/repl-and-main
It’s on the lein-cljsbuild of things, let’s see if someone else has the same problem
Given the amount of headache that I am having when using lein, how feasible is it to not use a build tool and just use the deps stuff these days?
@skeuomorf I use deps.edn
(without lein) in many ClojureScript projects without issue. But I suppose it depends on what you are really doing. I suppose you are really asking about lein-cljsbuild
in particular.
Also, FWIW, if you'd still like to use lein
, but get some of the benefits of using deps.edn
(like the ability to use :local/root
or :git/url
/ :sha
coordinates), then this project is maturing https://github.com/RickMoynihan/lein-tools-deps
@mfikes Yeah, I think I maybe hassled by lein-cljsbuild
in particular not so much lien
in general
@mfikes do you have (or know of) a non trivial example of a non-lein project? Something with deps, test runner, maybe different profiles/env contexts?
I'm hassled by lein-cljsbuild myself because it doesn't expose the watch-fn
opt of the cljs compiler which I need for a peculiarity of my project
Have you seen shadow-cljs? i am using it in a projec with a few different builds, code splitting etc... you can hook onto the lifecycle builds... https://shadow-cljs.github.io/docs/UsersGuide.html#_lifecycle_hooks some more examples https://github.com/shadow-cljs/examples and the theller, the creator is very active with updates and suggestions in the shadow slack channel
@ramblurr In some projects, like Planck, I just have scripts. In others like coal-mine
, I wrote the "scripts" in Clojure, in others like, patch-tender
the "scripts" are so small, I just creates :main-opts
aliases. None of these are web projects, but for any of it, it seems like you can roll your own solutions, and it is a bit easier with cljs.main
being available.