This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-11-08
Channels
- # aws (3)
- # bangalore-clj (1)
- # beginners (47)
- # boot (137)
- # cider (1)
- # cljs-dev (67)
- # cljsrn (7)
- # clojure (122)
- # clojure-argentina (5)
- # clojure-berlin (4)
- # clojure-czech (12)
- # clojure-france (27)
- # clojure-italy (9)
- # clojure-russia (88)
- # clojure-spec (44)
- # clojure-uk (157)
- # clojurebridge (2)
- # clojurescript (236)
- # datomic (5)
- # devcards (3)
- # dirac (23)
- # emacs (13)
- # hoplon (29)
- # incanter (1)
- # leiningen (41)
- # microservices (1)
- # off-topic (78)
- # om (145)
- # onyx (13)
- # parinfer (8)
- # pedestal (4)
- # planck (15)
- # protorepl (1)
- # re-frame (72)
- # reagent (25)
- # ring (2)
- # specter (23)
- # test-check (9)
- # untangled (106)
- # vim (8)
- # yada (1)
I am really enjoying Planck. I’m working on packaging deps for use with bootstrapped cljs in the browser, and it is a huge help, both for the workflow & the many examples of working w/ the self-hosted compiler in the source.
One question about loading planck scripts using #!/usr/bin/env planck
— how can one pass command-line arguments to Planck? I can access the args in my script, but i also need to provide planck w/ a classpath and cache-dir.
@mhuebert I haven't tried it, but it's my understanding that you'll get them in *command-line-args*
@anmonteiro command-line-args works perfectly for accessing args for my script; however, I also need to pass args to planck. eg/ in ./my-script.cljs -K, the -K arg is for planck. Pretty sure this is about my lack of unix knowledge and not planck!
oh, then I also have lack of UNIX knowledge to help there 🙂
sorry
@anmonteiro and btw I’m looking forward to your talk tomorrow!
I suppose I'll see you tomorrow then 🙂
hmm. This is tricky, using the idea from that link I am able to pass some args to planck, but if I pass any other unexpected args, planck throws an ‘unrecognized option’ error
I can do something like this:
#!/bin/sh
":"; exec /usr/bin/env planck -i "$0" -c `lein classpath` -K
but the original command line args are lost.OK, got it:
#!/bin/sh
":"; exec /usr/bin/env planck -c `lein classpath` -K "$0" "$@“
from the planck cli docs: Binds planck.core/*command-line-args* to a seq of strings containing command line args that appear after any main option
. In the example above, “$0”, which is the path to the script we are running, must be passed at the end (as a naked ‘path’ option) instead of with the -i
option.