@stormqx/hawkeye
馃馃憖Run scripts on git diff files
Last updated a year ago by stormqx .
MITRepositoryBugsOriginal npmTarballpackage.json
$ cnpm install @stormqx/hawkeye 
SYNC missed versions from official npm registry.

hawkeye Build Status

????????Run scripts on git diff files

About

npm渚濊禆绠$悊閭d簺浜涓鏂囦腑鎻忚堪浜唍pm渚濊禆绠$悊鏂规鐨勬渶浣冲疄璺点傚叾涓亰鍒颁簡锛

浠讳綍鏃跺欐湁浜烘彁浜や簡 package.json, package-lock.json 鏇存柊鍚庯紝鍥㈤槦鍏朵粬鎴愬憳搴斿湪 git pull 鎷夊彇鏇存柊鍚庢墽琛 npm install 鑴氭湰瀹夎鏇存柊鍚庣殑渚濊禆鍖呫

hawkeye鐨勮璁℃剰鍥惧氨鏄皢杩欐鎿嶄綔鑷姩鍖栵細閫氳繃姣旇緝git澶存潵鑾峰彇git diff files(git diff-tree -r --name-only --no-commit-id HEAD@{1} HEAD)锛屽皾璇曞尮閰嶉厤缃枃浠朵腑澹版槑鐨勬枃浠跺拰鍛戒护銆 瀹炵幇鏂瑰紡鍙傝冧簡lint-staged

Installation

npm install --save-dev hawkeye
// package.json
{
  "hawkeye": {
    "package.json": "npm install"
  }
}
{
  "husky": {
    "hooks": {
      "post-merge": "hawkeye"
    }
  }
}

hawkeye涓鑸拰husky閰嶅悎鐫浣跨敤锛屽熷姪husky鏀归爂it閽╁瓙鐨勮兘鍔涳紝鍏佽浣犲湪涓嶅悓鐨勬椂鏈哄仛浣犳兂鍋氱殑浜嬫儏銆傛墍浠ヨ淇濊瘉package.json鐨勪緷璧栦腑瀹夎(npm install --save-dev)浜唄awkeye鍜husky

Command line flags

$ npx hawkeye --help
Usage: hawkeye [options]

Options:
  -V, --version  output the version number
  -d, --debug    Enable debug mode
  -h, --help     output usage information

Configuration

hawkeye鏀寔澶氱鏂瑰紡缂栬緫閰嶇疆鏂囦欢锛

  • hawkeye object in your package.json
  • .hawkeyerc file in JSON/JS/YML format
  • hawkeye.config.js file in JS format

鍏充簬format鐨勬洿澶氱粏鑺傚彲浠ユ煡鐪cosmiconfig

閰嶇疆鏂囦欢涓篛bject褰㈠紡锛屽叾涓璳ey涓虹敤浜庡尮閰嶆枃浠剁殑glob pattern锛寁alue涓哄尮閰嶆垚鍔熷悗鎵ц鐨勫懡浠ゃ俬awkeye浣跨敤micromatch鍖归厤glob pattern銆

.hawkeyerc.json閰嶇疆渚嬪瓙锛

{
  "package.json": "your-cmd"
}

publish

$ npm adduser
... input username password email

$ npm publish --access public

flow chart

hawkeye

Changelog

TODO

  • [鉁揮 debug mode
  • [ ] unit test
  • [鉁揮 travis.ci
  • [ ] codecov
  • [ ] changelog
  • [鉁揮 npm publish
  • [ ] TypeScript
  • [ ] validating config
  • [ ] windows support

License

MIT

Current Tags

  • 0.0.2                                ...           latest (a year ago)

3 Versions

  • 0.0.2                                ...           a year ago
  • 0.0.1-development                                ...           a year ago
  • 0.0.0-development                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (13)
Dev Dependencies (9)
Dependents (0)
None

Copyright 2014 - 2016 漏 taobao.org |