Git Product home page Git Product logo

depify's People

Contributors

hagmonk avatar tomasd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

depify's Issues

Add "--write" operation for creating a new deps.edn file

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.

The :jvm-opts extracted should not be placed at the top level of deps.edn map

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.

Merging :main-opts from existing deps.edn

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!

Allow input via stdin

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
  • or preprocess project.clj via some other tool

FYI, here is an example how to implement optional reading from stdin:
xsc/lein-ancient@9c973ce

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.