hagmonk / depify Goto Github PK
View Code? Open in Web Editor NEWCreates or updates your deps.edn file, based on your project’s project.clj
Creates or updates your deps.edn file, based on your project’s project.clj
From what I gather, one of the primary uses of this tool is to automate the conversion of existing Lein projects into deps.edn formats. However, it does not have a easy facility for the creation of these files.
If I try redirecting the stdout output into a new file, it gives an unexpected error
$ clj -M:depify > deps.edn
Error building classpath. Expected edn map in: <...>/deps.edn
Apparently the redirect target gets initialized as an empty file, which it tries to merge unsuccesfully, throwing an error in the process.
I can work around this using a .tmp file as hinted at in the Readme, but it is quite cumbersome:
rm deps.edn && clj -M:depify > deps.edn.tmp && mv deps.edn.tmp deps.edn
Would it be a good idea to smooth out this process for newcomers by adding a --write
flag to the command line invocation? This would create a new deps.edn
file in the current directory, prompting to overwrite an existing one.
Alternatively, it could ignore empty deps.edn files to make the original clj :M.depify > deps.edn
command work as expected.
I'm willing to submit a PR either way if it sounds acceptable.
Thanks for your tool! I recently try to convert my project.clj to deps.edn.
I found your depify did it quite nice! but when I try to launch the repl using the deps.edn. I found the :jvm-opts did not used by repl. After some research, tool.deps did not use the top level :jvm-opts.
don't know it is a tool.deps issue, or the extracted jvm-opts should be placed in some aliases.
Managed dependencies produce a :mvn/version
of nil
Hello folks!
I have a small feature request/bug report on something I am trying to do for cider-nrepl
. I have a deps.edn
with the following section:
{:aliases
{:test-cljs {:main-opts ["-m" "nrepl.cmdline" "--middleware"
"[cider.nrepl/cider-middleware,cider.piggieback/wrap-cljs-repl]"]}}
And cider-nrepl
has a project.clj
with the following :profiles
key:
:test-cljs {:test-paths ["test/cljs"]
:dependencies [[cider/piggieback "0.3.9"]]
It would be really awesome if somehow the end result could be:
{:aliases
:test-cljs {:extra-paths ["test/cljs"]
:extra-deps {cider/piggieback {:mvn/version "0.3.9"}}
:main-opts ["-m" "nrepl.cmdline" "--middleware"
"[cider.nrepl/cider-middleware,cider.piggieback/wrap-cljs-repl]"]}}
I could then generate the deps.edn
my Clojure CLI launcher and ditch the :deps
section that I currently have in there 😄
Thank you for your work on this lib, I see it is going to be very useful!
It would be great to able to feed depify with lein pprint
output, e.g.
lein pprint | clj -A:depify
This would be useful for people who need to:
lein with-profile +my-profile pprint | clj -A:depify
FYI, here is an example how to implement optional reading from stdin:
xsc/lein-ancient@9c973ce
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.