Skip to content

Commit

Permalink
Document --with-node-modules flag (prettier#1701)
Browse files Browse the repository at this point in the history
  • Loading branch information
thymikee authored and vjeux committed May 24, 2017
1 parent 1df1389 commit 3a431d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ prettier --single-quote --trailing-comma es5 --write "{app,__{tests,mocks}__}/**
(Don't forget the quotes around the globs! The quotes make sure that Prettier
expands the globs rather than your shell, for cross-platform usage.)

Prettier CLI will ignore files located in `node_modules` directory. To opt-out from this behavior use `--with-node-modules` flag.

In the future we will have better support for formatting whole projects.

If you're worried that Prettier will change the correctness of your code, add `--debug-check` to the command.
Expand Down
1 change: 1 addition & 0 deletions bin/prettier.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ if (argv["help"] || (!filepatterns.length && !stdin)) {
" The range will extend forwards to the end of the selected statement.\n" +
" Defaults to Infinity.\n" +
" --no-color Do not colorize error messages.\n" +
" --with-node-modules Process files inside `node_modules` directory.\n" +
" --version or -v Print Prettier version.\n" +
"\n"
);
Expand Down

0 comments on commit 3a431d3

Please sign in to comment.