You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+25-11Lines changed: 25 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,23 +64,37 @@ Available features from docker:
64
64
65
65
Formatting files or checking if they're already formatted is possible from the command line. This requires `node` and `npm`.
66
66
67
-
The extension has to be downloaded and compiled:
68
-
- Locate the installed extension path or download the extension from Github.
67
+
### Available features from the command line:
68
+
- To prettify a file: `npm run --silent prettify-md < input.md`.
69
+
- To prettify a file and save the output: `npm run --silent prettify-md < input.md > output.md`.
70
+
- To check whether a file is prettyfied or not: `npm run --silent check-md < input.md`. This will fail with an exception and return code `1` if the file is not prettyfied.
71
+
72
+
> Note: the `--silent` switch sets the npm log level to silent, which is useful to hide the executed file name and concentrate on the actual output.
73
+
74
+
### Installation
75
+
76
+
To access the CLI, the extension can either be used from the Github sources, from the install VSCode extension or from npm.
77
+
78
+
#### Compiling from the source code
79
+
80
+
- Download the source code.
69
81
- Go to the extension directory.
70
82
- Run `npm install`.
71
83
- Run `npm run compile`.
72
84
73
-
The typical location of the installed extension (your actual version might differ):
-To prettify a file: `npm run --silent prettify-md < input.md`.
80
-
-To prettify a file and save the output: `npm run --silent prettify-md < input.md > output.md`.
81
-
-To check whether a file is prettyfied or not: `npm run --silent check-md < input.md`. This will fail with an exception and return code `1` if the file is not prettyfied.
87
+
Locate the installed extension path. The typical location of the installed extension:
> Note: the `--silent` switch sets the npm log level to silent, which is useful to hide the executed file name and concentrate on the actual output.
92
+
#### Using it from npm
93
+
94
+
Install the npm package `npm install -g markdown-table-prettify`. Use `npx` to prettify files:
95
+
- To prettify a file: `npx markdown-table-prettify < input.md`.
96
+
- To prettify a file and save the output: `npx markdown-table-prettify < input.md > output.md`.
97
+
- To check whether a file is prettyfied or not: `npx markdown-table-prettify --check < input.md`. This will fail with an exception and return code `1` if the file is not prettyfied.
0 commit comments