This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-04-25
Channels
- # architecture (4)
- # bangalore-clj (3)
- # beginners (11)
- # chestnut (1)
- # cider (24)
- # cljs-dev (14)
- # clojure (97)
- # clojure-finland (1)
- # clojure-gamedev (19)
- # clojure-italy (11)
- # clojure-nl (31)
- # clojure-norway (1)
- # clojure-uk (52)
- # clojurescript (71)
- # core-async (4)
- # cursive (60)
- # datascript (8)
- # datomic (115)
- # emacs (29)
- # figwheel (11)
- # fulcro (3)
- # garden (1)
- # hoplon (1)
- # lein-figwheel (1)
- # leiningen (7)
- # luminus (13)
- # mount (1)
- # off-topic (51)
- # onyx (31)
- # pedestal (2)
- # portkey (1)
- # re-frame (22)
- # reagent (22)
- # reitit (6)
- # remote-jobs (1)
- # schema (1)
- # shadow-cljs (73)
- # specter (2)
- # sql (1)
- # unrepl (3)
- # vim (11)
- # yada (4)
I am trying …. for a CLI app to provide options & usage
there are two excellent node libs command-line-args
and command-line-usage
command line-args
integrates very easily
but am having some trouble with command-line-usage
has anyone seen this before?
@raymcdermott are you not using :target :node-script
?
I am using that
standard stuff afaik
I don’t think so …. checking
you can try running node package/main.js --inspect-brk
and then turn on pause on exceptions
UNKNOWN_OPTION: Unknown option: --inspect-brk
it gives an error on domain.js
NOENT
no idea. doesn't seem to be the exception you are looking for. does it work if you just let it run again?
no, then same error on bootstrap_node.js
then module.js
then internal/module.js
then the error I posted
that is misleading, the error occurs while your code is LOADING not while it is executing
oh yes, I do that
it runs inside main
sorry, misunderstood what you meant there
ok bascially what happens is that shadow-cljs appends a file that contains (vouch-admin-cli.main/main ...)
https://github.com/thheller/shadow-cljs/blob/master/src/main/shadow/cljs/node_bootstrap.txt#L49-L50
so is it the transitive dep?
you should get to node_modules/command-line-usage/lib/chalk-format.js:8:13
in the debugger
it’s giving str = undefined
which is the arg being passed it
doing…
(x (clj->js [{:header "My CLI"
:content "Manage your environment"}
{:header :Options
:optionList [{:name "create-xxxx"
:alias :c
:typeLabel "{underline name}"
:description "Create xxxx with that name"}
{:name "help"
:alias :h
:description "Print this usage guide."}]}]))
"
My CLI\r
\r
Manage your environment \r
Options\r
\r
-c, --create-xxxx name Create xxxx with that name \r
-h, --help Print this usage guide. \r
"
I have some entries without a :description
key
and that breaks it !
if only JS had spec
thanks vm for your help
would have wasted a shit ton more time
I’m still loving those libs though
I think what OP meant was if it's possible with regards to shadow-cljs not deps.edn
Hi Channel! Is there an tutorial entry on how to combine server clj run by leiningen with shadow-cljs? In a manner of how figwheel does that I can do a tutorial entry for that, if you explain. p.s. the tool is awesome, great thanks to the author and conrtibutors UPD: found a proper example, thanks
@thheller even though shadow-cljs didn’t make top two to be funded by clojurists together - good to see it come in a strong #4 - good exposure. Perhaps next round! https://www.clojuriststogether.org/news/q2-2018-funding-announcement/
Yeah it was a good application and we would have liked to fund it if we had more money