Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(prettier): output to stdout instead of write file by default unless specified --write flag #332

Merged
merged 14 commits into from
May 21, 2019
Prev Previous commit
Next Next commit
add help message for --write flag
  • Loading branch information
axetroy committed May 21, 2019
commit 182908299059c3c92cf3cbffccdf898ee060f7ed
8 changes: 6 additions & 2 deletions prettier/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Usage: deno prettier/main.ts [options] [files...]
Options:
-H, --help Show this help message and exit.
--check Check if the source files are formatted.
--write Whether to write to the file, otherwise it will output to stdout, Defaults to false.
--ignore <path> Ignore the given path(s).

JS/TS Styling Options:
Expand Down Expand Up @@ -54,14 +55,17 @@ Markdown Styling Options:
Defaults to preserve.

Example:
deno prettier/main.ts script1.ts script2.js
deno prettier/main.ts --write script1.ts script2.js
Formats the files

deno prettier/main.ts --check script1.ts script2.js
Checks if the files are formatted

deno prettier/main.ts
deno prettier/main.ts --write
Formats the all files in the repository

deno prettier/main.ts script1.ts
Print the formatted code to stdout
`;

// Available parsers
Expand Down