broccolijs / broccoli

Browser compilation library – an asset pipeline for applications that run in the browser
https://broccoli.build
MIT License
3.33k stars 217 forks source link

build --overwrite error #433

Closed Lazerbeak12345 closed 4 years ago

Lazerbeak12345 commented 4 years ago

The problem

I've been following the guide on the getting started page and I noticed an error. (I'm sorry if this isn't the correct repo, but it seems like it would be the right place)

The page says the following:

To run a build, run yarn build (if you added the script) or broccoli build --overwrite (note: without --overwrite the contents of the output directory dist will NOT be overwritten and produce an error).

I tried running npx broccoli build --overwrite yarn broccoli build --overwrite and yarn build --overwrite yet they all have approximately this output:

yarn run v1.17.3
warning package.json: No license field
$ broccoli build --overwrite
error: unknown option `--overwrite'
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

My hunch is that this command was deprecated, and the guide hasn't been updated yet.

Solutions

Here's a list of different independent possible solutions.

My personal opinion is that the argument should be ignored, for compatibility, and should be removed from the doc. (My reason the tsc compilation command automatically replaces any file effected by the source change. I really like this approach.)

Lazerbeak12345 commented 4 years ago

I just realized this was, indeed the wrong repo. Just follow the reverse reference to see it on the (hopefully) proper repo.