This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-04-27
Channels
- # beginners (56)
- # calva (61)
- # cider (16)
- # clara (7)
- # cljdoc (2)
- # cljs-dev (2)
- # cljsrn (1)
- # clojure (144)
- # clojure-spec (23)
- # clojure-uk (5)
- # clojurescript (9)
- # clojureverse-ops (5)
- # community-development (4)
- # cursive (18)
- # datomic (15)
- # docs (6)
- # jackdaw (2)
- # nrepl (10)
- # nyc (2)
- # off-topic (18)
- # rewrite-clj (20)
- # shadow-cljs (31)
@thheller hi! iβve just started using shadow-cljs, and i love it! itβs just so fun and easy--it really shines in comparison to the clojurescript alternatives. i just wanted to let you know, and say thank you.
Goodday everybody, this is more of a general question in splitting up code in their own libs to be included in the main deps.edn as a dependency. In combination with the {:local/root "source-libs/io.monetashi.yesod"}
option while in development.
Now is the question, when this library needs node modules, how do I ensure those are included when I build my main project in shadow-cljs?
@deplect in your lib you can include a deps.cljs
with {:npm-deps {"the-dep" "version"}}
@thheller amazing, wonderful how this is structure. Find it hard to find this information online, on how to structure projects for code reuse. π π
I certainly have my own preferred way but there are too many other ways people do it
so I don't want to force my way on everybody since the other ways are just as valid π
Hahaha, yes, a few years back I was working in checkouts
and something called lein voom
. Worked ok, until it didn't. Whenever you write an article explaining your way I would be very interested π
I have not adopted deps.edn
at all because my main projects (work and shadow-cljs) have .java
sources which deps.edn
doesn't deal with
I kinda like the checkouts
approach to be honest since it is not committed to version control
does this also work with a shadow-cljs project, if I place my libs there using a deps.edn?
Hi. I'm new to shadow-cljs
. I quite like what I've seen of it so far, and it seems less magic to me than what I've tried in the past, although there's still lots I don't understand.
I am now trying to convert a project using lein
, figwheel
, cljsbuild
etc. to shadow-cljs
, but I'm running into an error that I have not been able to figure out.
I am using historian
and I get the following error from the historian
code when I try to compile
:
> Use of undeclared Var historian.core/off-the-record
where off-THE-RECORD
is a macro.
This works fine using lein
, so I'm not sure what's wrong.
I've tried a few things, but I'm not really sure where to look.
Any ideas?
https://github.com/wodin/shadow-historian-test
@esiotrot hmm the macros are setup incorrectly in historian. it works because of this https://dev.clojure.org/jira/browse/CLJS-2454 which shadow-cljs sort of fixed
yeah kind of. macros in .cljc
files are tricky about about 90% of the libs I looked it do it "wrong"
(ns historian.core
{:doc "Manage states for your atoms. (Easy undo/redo)"
:author "Frozenlock"
:quote "The present is the least important time we live in. --Alan Kay"}
#?(:cljs (:require-macros [historian.core :refer (off-the-record)])))
then users of that lib would not need to worry about an extra :require-macros [historian.core]
themselves
I actually tried using require-macros
but was not able to get it to work.
Thanks for the info.
I'm debating whether or not I add support for this particular "bug". is the historian author "active"? would it be feasible to get a fix released quickly?