Skip to content

Commit a721ad4

Browse files
committed
Add docker info
1 parent c3db576 commit a721ad4

2 files changed

Lines changed: 19 additions & 2 deletions

File tree

Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM node:current
2+
3+
WORKDIR /app
4+
5+
COPY . .
6+
7+
RUN npm ci
8+
RUN npm run compile
9+
10+
ENTRYPOINT [ "node", "./out/cli/index.js" ]

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Makes tables more readable for humans. Compatible with the Markdown writer plugi
1111
- Save space by not right-padding the last column if the table has no border.
1212
- Support empty columns inside tables.
1313
- Support column alignment options with ":".
14-
- CLI support to prettify files.
14+
- CLI and docker support to prettify files.
1515

1616
![feature X](assets/animation.gif)
1717

@@ -25,7 +25,7 @@ The extension has to be downloaded and compiled:
2525
- Run `npm install`.
2626
- Run `npm run compile`.
2727

28-
The tipical location of the installed extension (your actual version might differ):
28+
The typical location of the installed extension (your actual version might differ):
2929
- Windows %USERPROFILE%\.vscode\extensions\darkriszty.markdown-table-prettify-3.0.0
3030
- macOS ~/.vscode/extensions/darkriszty.markdown-table-prettify-3.0.0
3131
- Linux ~/.vscode/extensions/darkriszty.markdown-table-prettify-3.0.0
@@ -37,6 +37,13 @@ Available features from the command line:
3737

3838
> 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.
3939
40+
### Formatting with docker
41+
42+
Available features from docker:
43+
- To prettify a file: `docker container run -i darkriszty/prettify-md < input.md`.
44+
- To prettify a file and save the output: `docker container run -i darkriszty/prettify-md < input.md > output.md`.
45+
- To check whether a file is prettyfied or not: `docker container run -i darkriszty/prettify-md --check < input.md`. This will fail with an exception and return code `1` if the file is not prettyfied.
46+
4047
## Extension Settings
4148

4249
The extension is available for markdown language mode. It can either prettify a selected table (`Format Selection`) or the entire document (`Format Document`).

0 commit comments

Comments
 (0)