Closed stefanpenner closed 6 years ago
@stefanpenner what --watch
option should do for build
command?
@stefanpenner what --watch option should do for build command?
build --watch
should be the same as serve
but without HTTP server.
In theory we may just want to have a build
that optionally:
@stefanpenner any suggestions on how help
should change its behavior? do we look for more informative descriptions or rather stylistic improvements like colors?
@chrmod I believe help should enable discovery of functionality. For example help serve
should inform us of the various options/arguments. If that is already addressed (i didn't think it was) I would be interested in hearing from you what you feel would improve the help UX.
@stefanpenner
those are the outputs that commander.js
currently generates:
broccoli
Usage: broccoli [options] <command> [<args ...>]
Options:
-V, --version output the version number
-h, --help output usage information
Commands:
serve|s [options] start a broccoli server
build [options] [target] output files to target directory
broccoli build --help
Usage: build [options] [target]
output files to target directory
Options:
--brocfile-path <path> the path to brocfile
--output-path <path> the path to target output folder
--watch turn on the watcher
--watcher <watcher> select sane watcher mode
-h, --help output usage information
broccoli serve --help
Usage: serve|s [options]
start a broccoli server
Options:
--port <port> the port to bind to [4200] (default: 4200)
--host <host> the host to bind to [localhost] (default: localhost)
--brocfile-path <path> the path to brocfile
--output-path <path> the path to target output folder
--no-watch turn off the watcher (default: true)
--watcher <watcher> select sane watcher mode
-h, --help output usage information
I would say it is not bad, but in fact I do prefer how ember-cli
does it, and it is:
AFAIK commander.js
tries to stay away from stylistic sugar so if we want something colors, we would have to reimplement that part of commander (should not be much work, but still).
As of this moment broccoli has only two commands which share most options, so there is not much to work with really.
json output is one more cool feature from ember-cli.
I think this issue can be closed now. I feel what we have is enough to warrant a release. We can explore some next steps, and open appropriate issues for those once decided.
Guiding Ideas:
broccoli's cli should have:
Stuff
broccoli help
andbroccoli help serve
should display various serve options --port --host (and in the future more--brocfile-path=
for running specific brocfiles (@chrmod)--cwd=
for specifying the cwd of a given brocfile--output-path=
--watcher=
allowing configuration of which watch type should be used. Some users may need polling due to FS limitations etc. options = polling, watchman, events--watch=
allow toggling the watcher (for both build and watch) #