{"id":13507941,"url":"https://github.com/rkotze/eye_drops","last_synced_at":"2025-11-01T21:30:33.982Z","repository":{"id":62429517,"uuid":"49841846","full_name":"rkotze/eye_drops","owner":"rkotze","description":"Configurable Elixir mix task to watch file changes and run the corresponding command.","archived":false,"fork":false,"pushed_at":"2017-02-26T22:13:08.000Z","size":135,"stargazers_count":53,"open_issues_count":1,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-07T17:23:50.093Z","etag":null,"topics":["mix-tasks","tdd","testing","watch"],"latest_commit_sha":null,"homepage":"https://hex.pm/packages/eye_drops","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rkotze.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-18T00:07:27.000Z","updated_at":"2024-04-20T14:07:55.000Z","dependencies_parsed_at":"2022-11-01T20:05:29.464Z","dependency_job_id":null,"html_url":"https://github.com/rkotze/eye_drops","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rkotze%2Feye_drops","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rkotze%2Feye_drops/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rkotze%2Feye_drops/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rkotze%2Feye_drops/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rkotze","download_url":"https://codeload.github.com/rkotze/eye_drops/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239331465,"owners_count":19621220,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mix-tasks","tdd","testing","watch"],"created_at":"2024-08-01T02:00:43.800Z","updated_at":"2025-11-01T21:30:33.928Z","avatar_url":"https://github.com/rkotze.png","language":"Elixir","funding_links":[],"categories":["Files and Directories"],"sub_categories":[],"readme":"# EyeDrops\n\n[![Build Status](https://travis-ci.org/rkotze/eye_drops.svg?branch=master)](https://travis-ci.org/rkotze/eye_drops) \n[![Gitter](https://badges.gitter.im/rkotze/eye_drops.svg)](https://gitter.im/rkotze/eye_drops?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge)\n[![Hex pm](https://img.shields.io/hexpm/v/eye_drops.svg?style=flat)](https://hex.pm/packages/eye_drops)\n\n### A configurable Elixir mix watch task\n\n`mix eye_drops` Start watching all configured tasks ... [more options](#optional-switches)\n\n### Description\n\nWatch file changes in a project and run the corresponding command when a matching file change happens.\n\nThe reason for this is when code changes are made you typically want to run unit and acceptance tests. So while you make changes you can configure this mix tasks to auto run and help get feed back quicker.\n\n* [Installation](#installation)\n* [Basic setup](#basic-setup)\n* [Optional switches](#optional-switches)\n* [While running](#commands-while-running-eye_drops)\n* [Contribute](#contribute)\n* [Using vagrant](#using-vagrant)\n\n## Installation\n\nAdd `eye_drops` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [{:eye_drops, \"~\u003e 1.3\"}]\nend\n```\n\n## Basic setup\n\nIn your config folder, add the following `eye_drops` config into one of your config files.\n\nThe example below will run the `mix test` command\n\n```elixir\nconfig :eye_drops, \n  tasks: [\n    %{\n      id: :unit_tests,\n      name: \"Unit tests\",\n      run_on_start: true,\n      cmd: \"mix test\",\n      paths: [\"web/*\", \"test/*\"]\n    },\n    %{\n      id: :acceptance,\n      name: \"Acceptance tests\",\n      cmd: \"mix acceptance\",\n      paths: [\"web/*\", \"features/*\"]\n    }\n  ]\n```\n\nYou can setup multiple tasks and it will run one after the other.\n\n### Task config properties\n\n- `id` unique atom to identify tasks\n- `name` provide a name for task\n- `run_on_start` default is false. When EyeDrops starts, tasks with this set to true will run as well  \n- `cmd` the actual command to run\n- `path` is a list. Can be exact, glob pattern or just a folder name\n\n### Commands while running eye_drops\n\nWhen EyeDrops has started you can run all or a specific task without needing to stop or change a file\n\n- `all` this will run all your tasks\n- `task_id` run a specific task from your EyeDrops config\n\n## Optional switches\n\n- `mix eye_drops --include-tasks \"unit_tests,acceptance\"` provide the id of tasks to watch instead of all\n\n## Using vagrant\n\nThis is if you are editing your files outside of the vagrant machine e.g. windows but running commands in vagrant.\n\nThe idea is when the task runs it first ssh into your vagrant machine and then executes the command.\n\n`vagrant ssh-config \u003e .ssh-config` - save the ssh-config on your host machine\n\n```elixir\nconfig :eye_drops, \n  tasks: [\n    %{\n      id: :unit_tests,\n      name: \"Unit tests\",\n      cmd: \"ssh -F .ssh-config default mix test\",\n      paths: [\"web/*\", \"test/*\"]\n    }\n  ]\n```\n\nRun `mix eye_drops` from outside of vagrant in host terminal where the mix.exs file is located\n\n## Contribute\n\n1. [Create issue](http://github.com/rkotze/eye_drops/issues)\n2. [Fork it!](http://github.com/rkotze/eye_drops/fork)\n3. Create your feature branch (`git checkout -b my-new-feature`)\n4. Commit your changes (`git commit -am 'Add some feature'`)\n5. Push to the branch (`git push origin my-new-feature`)\n6. Create new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frkotze%2Feye_drops","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frkotze%2Feye_drops","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frkotze%2Feye_drops/lists"}