Git Product home page Git Product logo

executor's Introduction

@lassehaslev/executor

Run a command every time a file change. Its that simple.

Install

# Install project globaly
npm install -g @lassehaslev/executor

# Install executor per project
npm install @lassehaslev/executor --save-dev

Usage

Command line

# Doc
executor "<command>"
    [--run-on-first=true]
    [--watch="**/*"]
    [--ignore=""]

    -- [{Custom arguments added to the <command>}]

# Example
executor './vendor/bin/phpunit --color=always' --watch='**/*.php' --ignore='/node_modules|\.git|vendor/'

# Custom arguments
executor './vendor/bin/phpunit --color=always' --watch='**/*.php' -- --filter="CustomTest"

Npm

package.json

{
    "scripts": {
        "my-script": "executor '<command>' [options]",
    }
}

Now you can run the command npm run my-script from command line.

If you run per project and not in a npm script the command is ./node_modules/.bin/executor.

Pro tip: use npm run my-script -- --your --command-option="yey" to add options to your command.

Laravel TDD

I use this project to run Test Driven Development for my Laravel applications.

Check out this Laracasts thread for more information.

Add tdd script to projects package.json

{
  "scripts": {
    "tdd": "executor './vendor/bin/phpunit --color=always' --watch='**/*.php' --ignore='node_modules/' --ignore='vendor/'"
  }
}

Then run npm run tdd from your projects folder.

Pro tip: use npm run tdd -- --filter="awesome_test" to filter your phpunit tests.

Contributing

Follow these steps to contribute to project.

  1. Fork the repo on GitHub
  2. Clone the project to your own machine
  3. Commit changes to your own branch
  4. Push your work back up to your fork
  5. Submit a Pull request so that we can review your changes

Development

# link to local command line
npm link

# compile to es6
npm run dev

# When you are finished unlink local command
npm unlink

executor's People

Contributors

lassehaslev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

executor's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.