GitXplorerGitXplorer
t

run4staged

public
3 stars
1 forks
0 issues

Commits

List of commits on branch master.
Unverified
baa2509d76bae2b7d7d0bccb950b1663add47d5f

update run function - inherit stdio, update snapshot

ttabrindle committed 7 years ago
Unverified
42a4c390e90cf148c28e12dfb0e3b93d6681d5cc

Merge branch 'master' of https://github.com/tabrindle/run4staged

ttabrindle committed 7 years ago
Unverified
59ff50e26ec4c452cfa029e2d1216ad1b02751fb

uptick to v1.1.0

ttabrindle committed 7 years ago
Verified
55a46a8087acfca0726a3b8e83ec3c081c500630

Merge pull request #1 from tabrindle/feature/travis

ttabrindle committed 7 years ago
Unverified
0477917cd1a875361b8ade77a0270edac6fc4a79

run files in order

ttabrindle committed 7 years ago
Unverified
e084e11e468f04ec85a8778ded78ec4ace7cbcbd

sort array to fix snapshot issues

ttabrindle committed 7 years ago

README

The README file for this repository.

run4staged

Simple task runner for staged git files

Build Status npm version MIT Licence

Install

npm install run4staged --save-dev || yarn add run4staged --dev

Usage

  • run4staged runs on each staged file - convenient for linting, reformatting or any precommit checks

run4staged 'echo'

  • specify a glob to select certain staged files, otherwise default is **/*

run4staged 'echo' --glob '*.jsx'

  • run4staged does not resolve npm binaries - either give it a full path, use npm run or yarn

run4staged --command 'npm run eslint --fix'

  • if running from a npm script, you can skip using npm run or yarn in the script
"scripts": {
  "lint:staged": "run4staged 'eslint --fix'"
}
  • verbose will give additional logging

run4staged --command 'yarn eslint --fix' --verbose

  • run each file by itself

run4staged 'echo' --serial

  • show no output from commands

run4staged 'yarn prettier' --quiet

Contributing

PRs for additional features are welcome!

License

MIT

Copyright (c) 2017 Trevor Brindle

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.