Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mainshayne233/ex_versions
https://github.com/mainshayne233/ex_versions
Last synced: 8 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/mainshayne233/ex_versions
- Owner: MainShayne233
- Created: 2016-08-07T05:17:54.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-08-07T06:37:40.000Z (over 8 years ago)
- Last Synced: 2024-10-29T08:42:29.254Z (21 days ago)
- Language: Elixir
- Size: 11.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ExVersions
Updates your README.md with version credentials of all your (specified) external dependencies.## Installation
1. Add `ex_versions` to your list of dependencies in `mix.exs`:```elixir
def deps do
[{:ex_versions, "~> 0.0.1"}]
end
```2. Ensure `ex_versions` is started before your application:
```elixir
def application do
[applications: [:ex_versions]]
end
```
## Usage
Within your apps start function, such as in ```lib/my_app.ex``` for Phoenix apps, add:
```elixir
# For each tuple:
## - First argument is the desired title for the dependency.
## - Second argument is the bash command for the version of the dependency.
ExVersions.watch [
{"Elixir", "elixir -v"},
{"Phoenix", "mix phoenix.new -v"},
{"Postgresql", "pg_config --version"},
{"npm", "npm -v"},
{"Node", "node -v"}
]
```Then simply add `````` in your README.md where you'd like the dependency versions to be placed. Make sure no characters follow ``````.
## Example
The following is what the output is when placing `````` below and running the watch function example from above.## Dependency Versions:
#### Elixir:
```bash
$ elixir -vErlang/OTP 19 [erts-8.0.1] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]
Elixir 1.3.1
```
#### Node:
```bash
$ node -vv6.1.0
```
#### npm:
```bash
$ npm -v3.10.3
```
#### Phoenix:
```bash
$ mix phoenix.new -vPhoenix v1.2.0
```
#### Postgresql:
```bash
$ pg_config --versionPostgreSQL 9.4.4
```