All Projects → rkotze → eye_drops

rkotze / eye_drops

Licence: MIT license
Configurable Elixir mix task to watch file changes and run the corresponding command.

Programming Languages

elixir
2628 projects

Projects that are alternatives of or similar to eye drops

Executor
Watch for file changes and then execute command. Very nice for test driven development.
Stars: ✭ 14 (-72.55%)
Mutual labels:  tdd, watch
gowatch
watch go files for developer, support run test case and auto reload server application
Stars: ✭ 18 (-64.71%)
Mutual labels:  watch
birthtalk
Meet who have birth common with you
Stars: ✭ 36 (-29.41%)
Mutual labels:  tdd
finance-project-ddd
Projeto financeiro usando domain driven design, tdd, arquitetura hexagonal e solid
Stars: ✭ 67 (+31.37%)
Mutual labels:  tdd
chai
BDD / TDD assertion framework for node.js and the browser that can be paired with any testing framework.
Stars: ✭ 7,842 (+15276.47%)
Mutual labels:  tdd
eucWatch
EUC Watch. Dash for Electric Unicycles on NRF52xx based wearables. Supports Kingsong ( All models ), Inmotion ( All ), Ninebot ( All ) , Begode ( Gotway, All ) and Leaperkim (All)
Stars: ✭ 44 (-13.73%)
Mutual labels:  watch
Jasmine
Simple JavaScript testing framework for browsers and node.js
Stars: ✭ 15,261 (+29823.53%)
Mutual labels:  tdd
goss
Quick and Easy server testing/validation
Stars: ✭ 26 (-49.02%)
Mutual labels:  tdd
Examin
Examin is a developer tool that generates React unit tests for your application. Ensure your application renders as expected before adding new features. Examin writes the baseline unit tests and allows developers to customize their tests for their application.
Stars: ✭ 75 (+47.06%)
Mutual labels:  tdd
clipboard-watch
This is height performance clipboard watcher, support windows,osx
Stars: ✭ 21 (-58.82%)
Mutual labels:  watch
PowerShell-Watch
A PowerShell Watch-Command cmdlet for repeatedly running a command or block of code until a change in the output occurs.
Stars: ✭ 49 (-3.92%)
Mutual labels:  watch
ytmous
Anonymous Youtube Proxy
Stars: ✭ 60 (+17.65%)
Mutual labels:  watch
memo
다양한 MD 메모
Stars: ✭ 87 (+70.59%)
Mutual labels:  tdd
Unmockable
💉 ↪️ 🎁 Unmockable objects wrapping in .NET
Stars: ✭ 35 (-31.37%)
Mutual labels:  tdd
mix systemd
Library of mix tasks to generate a systemd unit file for an Elixir project
Stars: ✭ 48 (-5.88%)
Mutual labels:  mix-tasks
TDD
Everything about testing, especially TDD, Test-Driven Development: Really, It’s a Design Technique
Stars: ✭ 28 (-45.1%)
Mutual labels:  tdd
svut
SVUT is a simple framework to create Verilog/SystemVerilog unit tests. Just focus on your tests!
Stars: ✭ 48 (-5.88%)
Mutual labels:  tdd
spotter
A command line tool for watching files and running shell commands when they change
Stars: ✭ 26 (-49.02%)
Mutual labels:  watch
mugshot
Framework independent visual testing library
Stars: ✭ 126 (+147.06%)
Mutual labels:  tdd
AnimeDLR
AnimeDLR
Stars: ✭ 47 (-7.84%)
Mutual labels:  watch

EyeDrops

Build Status Gitter Hex pm

A configurable Elixir mix watch task

mix eye_drops Start watching all configured tasks ... more options

Description

Watch file changes in a project and run the corresponding command when a matching file change happens.

The 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.

Installation

Add eye_drops to your list of dependencies in mix.exs:

def deps do
  [{:eye_drops, "~> 1.3"}]
end

Basic setup

In your config folder, add the following eye_drops config into one of your config files.

The example below will run the mix test command

config :eye_drops, 
  tasks: [
    %{
      id: :unit_tests,
      name: "Unit tests",
      run_on_start: true,
      cmd: "mix test",
      paths: ["web/*", "test/*"]
    },
    %{
      id: :acceptance,
      name: "Acceptance tests",
      cmd: "mix acceptance",
      paths: ["web/*", "features/*"]
    }
  ]

You can setup multiple tasks and it will run one after the other.

Task config properties

  • id unique atom to identify tasks
  • name provide a name for task
  • run_on_start default is false. When EyeDrops starts, tasks with this set to true will run as well
  • cmd the actual command to run
  • path is a list. Can be exact, glob pattern or just a folder name

Commands while running eye_drops

When EyeDrops has started you can run all or a specific task without needing to stop or change a file

  • all this will run all your tasks
  • task_id run a specific task from your EyeDrops config

Optional switches

  • mix eye_drops --include-tasks "unit_tests,acceptance" provide the id of tasks to watch instead of all

Using vagrant

This is if you are editing your files outside of the vagrant machine e.g. windows but running commands in vagrant.

The idea is when the task runs it first ssh into your vagrant machine and then executes the command.

vagrant ssh-config > .ssh-config - save the ssh-config on your host machine

config :eye_drops, 
  tasks: [
    %{
      id: :unit_tests,
      name: "Unit tests",
      cmd: "ssh -F .ssh-config default mix test",
      paths: ["web/*", "test/*"]
    }
  ]

Run mix eye_drops from outside of vagrant in host terminal where the mix.exs file is located

Contribute

  1. Create issue
  2. Fork it!
  3. Create your feature branch (git checkout -b my-new-feature)
  4. Commit your changes (git commit -am 'Add some feature')
  5. Push to the branch (git push origin my-new-feature)
  6. Create new Pull Request
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].