On Wed, Jul 13, 2016 at 10:47 AM, José Valim
<[email protected]> wrote:
> Elixir master already supports installing packages globally but only as
> escripts. You won't be able to use them directly in your Mix projects.

I'm interested how did that globally installing packages work? is it
documented somwhere?
http://elixir-lang.org/docs/master/mix/Mix.html (is there an online
version for `mix help` ? from here it seems only find API references
?)

BTW, I just found from this: (I'm not the only one searching for
global install elixir packages ...)
http://stackoverflow.com/questions/33548079/in-elixir-how-do-i-install-packages-globally

that `mix archive.install` looks like what I'm looking for,

`mix archive.install
https://github.com/phoenixframework/phoenix/releases/download/v1.0.3/phoenix_new-1.0.3.ez`

but I wonder is there a central place maintained all installable ez
files ? is there always a compiled ez file maintained for each phoenix
release ? why I can't see the ez file download link from
https://github.com/phoenixframework/phoenix/releases ?

from this comment I wonder does hex.pm saved a compiled ez copy for
each package's each release ?
https://github.com/hexpm/hex_web/issues/379#issuecomment-234240573

>>>>>>>>>>>>>>>>>>>>

About global packages, I wonder if anyone is using elixir to write
useful CLI tools ? or is phonenix and web server the only selling
point?

the question is: since I am not aware of a json parser in standard
elixir library, if I want to write a CLI tool to test JSON API with
some manipulation, probably I'll need to pull
https://hex.pm/packages/poison as dependency, then what's the best way
to deliver such a tool ?

think about this http tool written in python; I can do pip install to
user's home; then I can run this http tool, all dependencies are
managed automatically

https://pypi.python.org/pypi/httpie

➸ pip install httpie -U --user
Collecting httpie
  Downloading httpie-0.9.4-py2.py3-none-any.whl (71kB)
    100% |████████████████████████████████| 71kB 1.7MB/s
Collecting Pygments>=1.5 (from httpie)
  Downloading Pygments-2.1.3-py2.py3-none-any.whl (755kB)
    100% |████████████████████████████████| 757kB 1.5MB/s
Requirement already up-to-date: requests>=2.3.0 in
./.local/lib/python2.7/site-packages (from httpie)
Installing collected packages: Pygments, httpie
  Found existing installation: Pygments 2.1.1
    Uninstalling Pygments-2.1.1:
      Successfully uninstalled Pygments-2.1.1
Successfully installed Pygments-2.1.3 httpie-0.9.4

➸ http
usage: http [--json] [--form] [--pretty {all,colors,format,none}]
            [--style STYLE] [--print WHAT] [--headers] [--body] [--verbose]
            [--all] [--history-print WHAT] [--stream] [--output FILE]
            [--download] [--continue]
            [--session SESSION_NAME_OR_PATH | --session-read-only
SESSION_NAME_OR_PATH]
            [--auth USER[:PASS]] [--auth-type {basic,digest}]
            [--proxy PROTOCOL:PROXY_URL] [--follow]
            [--max-redirects MAX_REDIRECTS] [--timeout SECONDS]
            [--check-status] [--verify VERIFY]
            [--ssl {ssl2.3,tls1,tls1.1,tls1.2}] [--cert CERT]
            [--cert-key CERT_KEY] [--ignore-stdin] [--help] [--version]
            [--traceback] [--debug]
            [METHOD] URL [REQUEST_ITEM [REQUEST_ITEM ...]]
http: error: too few arguments

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-talk/CAJctwx7uC9mH7dsbh6PHXsDs3tggtN%2BA0fUbQEJAiYWc6cXhYQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to