facebookarchive / flow-remove-types

🚿 Removes Flow type annotations from JavaScript files with speed and simplicity.
MIT License
467 stars 52 forks source link

[Feature Request] Watcher #55

Closed gdborton closed 6 years ago

gdborton commented 7 years ago

Would it be possible to add a watch option to this package? This would make development much easier when working on a linked node_module.

I've been able to work around this temporarily by adding the following to the lib's package.json

{
  "devDependencies": {
    "chokidar-cli": "^1.2.0",
    "flow-remove-types": "^1.2.3"
  },
  "scripts": {
    "build": "rm -rf lib/ && flow-remove-types --out-dir lib/ src/ --pretty --all",
    "build:watch": "chokidar 'src/**/*.js' -c 'flow-remove-types {path} > lib/$(echo {path} | cut -c5-) --pretty --all'",
  }
}
leebyron commented 6 years ago

I'd be happy to entertain a PR implementing it.

I'll close this issue for repo maintenance since the next action is clear. If anyone wants to take this on, a PR is the best next step.

rodrigooler commented 6 years ago

Would be great this feature, would solve a headache.