We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4c4ab8b + b2dddf3 commit ad1e73bCopy full SHA for ad1e73b
README.md
@@ -12,6 +12,7 @@ $ tsfmt
12
-h, --help output usage information
13
-V, --version output the version number
14
-r, --replace replace .ts file
15
+ --stdin get formatting content from stdin
16
--no-tslint don't read a tslint.json
17
--no-editorconfig don't read a .editorconfig
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");
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
+
48
```bash
49
# replace. read file, and replace file.
50
$ tsfmt -r sample.ts
0 commit comments