tools-deps

Discuss tools.deps.alpha, tools.build, and the clj/clojure command-line scripts! See also #depstar #clj-new
2020-09-10T00:55:53.166200Z

I'm excited to try the new clj exec, at first glance, its giving me some powershell vibes... which I'm not sure about 😛

2020-09-10T01:00:25.167700Z

One question, in the guide it says: clj -A:deps -X:install :jar '"/path/to.jar"', couldn't you include the deps in the :install alias itself? And thus you could then omit the -A:deps and just do: clj -X:install :jar ...

seancorfield 2020-09-10T01:14:25.168300Z

It says clj -X:deps mvn-install :jar '"/path/to.jar"'

seancorfield 2020-09-10T01:14:38.168700Z

Are you looking at the old (stable) guide @didibus?

seancorfield 2020-09-10T01:14:50.168900Z

The prerelease is https://clojure.org/reference/deps_and_cli_prerelease

seancorfield 2020-09-10T01:15:16.169300Z

But, yes, in general you can combine the exec stuff and the dependencies.

seancorfield 2020-09-10T01:16:34.169600Z

I have some examples of that here https://github.com/seancorfield/clj-new#clojure--x-usage

2020-09-10T01:38:16.170200Z

I probably was, it was from the first blog post about it on inside clojure

2020-09-10T01:39:46.170700Z

Ah yes, the latest blog post says: "so you can supply the deps and the function to execute together" never mind then

2020-09-10T01:42:40.172500Z

So that's awesome, now all we need is a convention to define alias in some file that you put in a git repo, and something like: clj -X:deps install-alias some-git-repo and a corresponding clj -X:deps remove-alias some-git-repo and we have ourselves a little NPM of some sort.

2020-09-10T01:43:11.173Z

Well, it doesn't need to live inside -X:deps, but it would be an easier way to bootsrap it

2020-09-10T01:45:03.174100Z

You could even do something like: clj -X:deps install-alias :git some-git-repo :symlink true and it could create a symlink in your user /bin to: clj -X:your-alias

2020-09-10T01:45:33.174500Z

Sorry, none of this has to be included in deps, though I think it could be a good idea

2020-09-10T01:46:08.175100Z

Then clj could be used to install Clojure command line apps on your machine as well.

2020-09-10T01:47:56.175300Z

Might need some more hammock time