verbose / verb

HEADS UP! Verb is going though a major transition, we've completely refactored everything from the ground up. If you're interested, please see the dev branch.
MIT License
480 stars 32 forks source link

[Suggestion] Verb Watcher #101

Closed stefanwalther closed 7 years ago

stefanwalther commented 8 years ago

Current situation: I am using verb quite often in combination with grip (https://github.com/joeyespo/grip), just to review my READMEs before uploading. Currently - after each change - I have to run verb in the CLI.

Proposal: It would be extremely helpful to have an option for verb (or verb-cli basically) to watch the changes in the following files:

verb -w watches the following changes and re-runs verb:

@jonschlinkert, @doowb: What do you think?

tunnckoCore commented 8 years ago

I believe you can do this manually currently with dev/0.9.0.

verbfile.js


var watch = require('base-watch')
var verb = require('verb');
var app = verb().use(watch());

app.watch([
  'package.json',
  'verbfile.js',
  '.verb.md',
  './docs/**/*.*'
], {options: 'to chokidar'})

module.exports = app;

docs https://github.com/node-base/base-watch

But yea, builtin would be good too.

stefanwalther commented 7 years ago

Tried to use this, not working, do you have a working setup based on the latest version of verb (and the other components)?

jonschlinkert commented 7 years ago

try https://github.com/jonschlinkert/romanize#building-docs

stefanwalther commented 7 years ago

... solved it with a different approach, using docker-verb and nodemon: https://github.com/stefanwalther/docker-verb#watching-doc-changes

... therefore closing this issue/suggestion ...

jonschlinkert commented 7 years ago

@stefanwalther that's awesome!

btw, as a side note, I know I've been saying this forever, but we're very close to merging verb to master and publishing. we're finally working on the finishing touches to some libraries we wanted to finish first.

stefanwalther commented 7 years ago

@jonschlinkert That sounds good/perfect and having now the docker image it makes it much easier for me to migrate all projects because I can just update the docker image all my project will just be using ;-)