tools/format: format markdown files with prettier

This commit is contained in:
Bert Belder 2018-10-04 00:58:28 -07:00
parent 30acfdf331
commit 8ca082c508
No known key found for this signature in database
GPG Key ID: 7A77887B2E2ED461
3 changed files with 20 additions and 7 deletions

3
.prettierrc.json Normal file
View File

@ -0,0 +1,3 @@
{
"proseWrap": "always"
}

View File

@ -2,8 +2,7 @@
| **Linux & Mac** | **Windows** |
|:---------------:|:-----------:|
| [![Travis](https://travis-ci.com/denoland/deno.svg?branch=master)](https://travis-ci.com/denoland/deno) | [![Appveyor](https://ci.appveyor.com/api/projects/status/yel7wtcqwoy0to8x?branch=master&svg=true)](https://ci.appveyor.com/project/deno/deno) |
| [![][tci badge]][tci link] | [![][avy badge]][avy link] |
## A secure TypeScript runtime built on V8
@ -32,7 +31,7 @@
network access.
* Single executable:
```
```
> ls -lh out/release/deno
-rwxr-xr-x 1 rld staff 48M Aug 2 13:24 out/release/deno
> otool -L out/release/deno
@ -42,7 +41,7 @@
/System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 58286.51.6)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 400.9.0)
>
```
```
* Always dies on uncaught errors.
@ -152,3 +151,9 @@ Env vars: `DENO_BUILD_MODE`, `DENO_BUILD_PATH`, `DENO_BUILD_ARGS`.
5. Make sure `./tools/lint.py` passes.
6. Send a pull request.
7. Sign the [CLA](https://cla-assistant.io/denoland/deno), if you haven't already.
<!-- prettier-ignore -->
[avy badge]: https://ci.appveyor.com/api/projects/status/yel7wtcqwoy0to8x?branch=master&svg=true
[avy link]: https://ci.appveyor.com/project/deno/deno
[tci badge]: https://travis-ci.com/denoland/deno.svg?branch=master
[tci link]: https://travis-ci.com/denoland/deno

View File

@ -28,9 +28,14 @@ for fn in ["BUILD.gn", ".gn"] + find_exts("build_extra", ".gn", ".gni"):
# TODO(ry) Install yapf in third_party.
run(["yapf", "-i"] + glob("tools/*.py") + find_exts("build_extra", ".py"))
run(["node", prettier, "--write"] + find_exts("js/", ".js", ".ts") +
find_exts("tests/", ".js", ".ts") + find_exts("website/", ".js", ".ts") +
["rollup.config.js", "tsconfig.json", "tslint.json"])
# yapf: disable
run(["node", prettier, "--write"] +
["rollup.config.js"] + glob("*.json") + glob("*.md") +
find_exts(".github/", ".md") +
find_exts("js/", ".js", ".ts", ".md") +
find_exts("tests/", ".js", ".ts", ".md") +
find_exts("website/", ".js", ".ts", ".md"))
# yapf: enable
# Requires rustfmt 0.8.2 (flags were different in previous versions)
run(["rustfmt", "--config-path", rustfmt_config] + find_exts("src/", ".rs"))