File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ $ tsfmt
12
12
-h, --help output usage information
13
13
-V, --version output the version number
14
14
-r, --replace replace .ts file
15
+ --stdin get formatting content from stdin
15
16
--no-tslint don' t read a tslint.json
16
17
--no-editorconfig don' t read a .editorconfig
17
18
--no-tsfmt don' t read a tsfmt.json
@@ -37,6 +38,13 @@ class Sample { hello(word= "world") { return "Hello, " + word; } }
37
38
new Sample().hello("TypeScript");
38
39
```
39
40
41
+ ```bash
42
+ # from stdin. read from stdin, output to stdout.
43
+ $ cat sample.ts | tsfmt --stdin sample.ts
44
+ class Sample { hello(word= "world") { return "Hello, " + word; } }
45
+ new Sample().hello("TypeScript");
46
+ ```
47
+
40
48
```bash
41
49
# replace. read file, and replace file.
42
50
$ tsfmt -r sample.ts
You can’t perform that action at this time.
0 commit comments