Skip to content

Commit 593c285

Browse files
format: use shell for code blocks, add missing clojure language to code blocks
1 parent 9a63c3b commit 593c285

54 files changed

Lines changed: 143 additions & 145 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
- dev: checkout v4 & python v5 actions in publish-book workflow
2020
- dev: sparse checkout scheduled version workflow
2121
- dev: upload-artefact v4 & remove explicit token from megalinter
22+
- format: use shell for code blocks, add missing clojure language to code blocks
2223

2324
## Added
2425
- button link to Clojure CLI releases changelog to view available versions

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,34 +81,34 @@ Publish book workflow installs Material for MkDocs version 9
8181

8282
Install mkdocs version 9 using the Python pip package manager
8383

84-
```bash
84+
```shell
8585
pip install mkdocs-material=="9.*"
8686
```
8787

8888
Install the plugins used by the Practicalli site using Pip (these are also installed in the GitHub Action workflow)
8989

90-
```bash
90+
```shell
9191
pip3 install mkdocs-material mkdocs-callouts mkdocs-glightbox mkdocs-git-revision-date-localized-plugin mkdocs-redirects pillow cairosvg
9292
```
9393

9494
> pillow and cairosvg python packages are required for [Social Cards](https://squidfunk.github.io/mkdocs-material/setup/setting-up-social-cards/)
9595
9696
Fork the GitHub repository and clone that fork to your computer,
9797

98-
```bash
98+
```shell
9999
git clone https://github.com/<your-github-account>/<repository>.git
100100
```
101101

102102
Run a local server from the root of the cloned project
103103

104-
```bash
104+
```shell
105105
make docs
106106
```
107107

108108
The website will open at <http://localhost:8000>
109109

110110
If making smaller changes, then only rebuild the content that changes, speeding up the local development process
111-
```bash
111+
```shell
112112
make docs-changed
113113
```
114114

docs/alternative-tools/clojure-cli/basic-repl.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Use `clj` when you want to run a repl (or preferably use [rebel readline](rebel-
1414

1515
`clj` command in a terminal window starts a Clojure REPL and shows the version of Clojure used. The command does not need to be in a directory containing a Clojure project.
1616

17-
```bash
17+
```shell
1818
clj
1919
```
2020

docs/alternative-tools/clojure-cli/evaluate-an-expression.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This expression calls the `+` function with the arguments `1 2 3 4 5`. As this
1212
Using the `-e` option an expression can be passed to the Clojure CLI tools and a value returned
1313

1414

15-
```bash
15+
```shell
1616
clojure -e (+ 1 2 3 4 5)
1717
```
1818

docs/alternative-tools/clojure-cli/set-namespace-on-repl-startup.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ Switching to a specific namespace in the REPL allows calling functions by name,
1111

1212
To require and switch to a namespace on startup, use the `clojure` or `clj` commands with the --eval option to run the specific commands. The --repl option will ensure the repl starts.
1313

14-
```bash
14+
```shell
1515
clj --eval "(require 'practicalli.random-clojure-core-function)" --eval "(in-ns 'practicalli.random-clojure-core-function)" --repl
1616
```
1717

1818

1919
`-r` or `(clojure.main/repl)` are the same as using the `--repl` option
2020

21-
```bash
21+
```shell
2222
clj -e "(ns foo.bar) (alter-var-root #'*ns* (constantly 'foo.bar))" -r
2323
clj -e "(ns foo.bar) (alter-var-root #'*ns* (constantly 'foo.bar)) (clojure.main/repl)"
2424
```

docs/alternative-tools/data-inspector/reveal.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Use Reveal with a terminal REPL or a Clojure editor that uses nrepl such as Emac
1717

1818
Open a terminal and run the command:
1919

20-
```bash
20+
```shell
2121
clojure -M:inspect/reveal
2222
```
2323
> Use the `clj` command if the `rlwrap` binary is available
@@ -105,7 +105,7 @@ Reveal can be used as a `tap>` target with the Rebel REPL, launching the Reveal
105105

106106
Start Rebel REPL with Reveal library as a dependency
107107

108-
```bash
108+
```shell
109109
clojure -M:repl-reveal:repl/rebel
110110
```
111111

docs/alternative-tools/leiningen/index.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Install the Leiningen tool using the specific instructions for your Operating Sy
1717
=== "Linux"
1818
[Download the lein script](https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein) to your local `bin` directory. Then make the `lein` script executable and run `lein` to download the full version.
1919

20-
```bash
20+
```shell
2121
mkdir ~/bin
2222
curl https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein > ~/bin/lein
2323
chmod u+x ~/bin/lein
@@ -29,7 +29,7 @@ Install the Leiningen tool using the specific instructions for your Operating Sy
2929
=== "Homebrew"
3030
If you have [Homebrew](https://brew.sh/) installed, run the following command in a terminal window.
3131

32-
```bash
32+
```shell
3333
brew install leiningen
3434
```
3535

@@ -51,7 +51,7 @@ Install the Leiningen tool using the specific instructions for your Operating Sy
5151

5252
If you have [Chocolatey](https://chocolatey.org/) installed, add the [Leiningen package](https://chocolatey.org/packages/Lein) by running the following command in a terminal window.
5353

54-
```bash
54+
```shell
5555
choco install lein
5656
```
5757

@@ -71,7 +71,7 @@ Install the Leiningen tool using the specific instructions for your Operating Sy
7171

7272
Check Leiningen is working by running `lein` command in a terminal
7373

74-
```bash
74+
```shell
7575
lein help
7676
```
7777

@@ -104,13 +104,13 @@ Leiningen automatically includes the `test` directory when running, so no additi
104104

105105
Run all the tests saved to file:
106106

107-
```bash
107+
```shell
108108
lein test
109109
```
110110

111111
Run just the unit tests in a specific namepsace.
112112

113-
```bash
113+
```shell
114114
lein test :only domain.namespace-test
115115
```
116116

docs/clojure-cli/defining-aliases.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ clojure -X:project/run
124124

125125
Over-ride the default arguments by passing them on the command line
126126

127-
```bash
127+
```shell
128128
clojure -X:project/run '[:http/server :port]' 8888 :log/mulog :console :profile :dev
129129
```
130130

docs/clojure-cli/execution-options.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ The double quotes in an EDN string must be wrapped by single quotes, along with
4646

4747
Run a project with the main namespace `practicalli.sudoku-solver`, without any additional aliases on the command line
4848

49-
```bash
49+
```shell
5050
clojure -M -m practicalli.sudoku-solver
5151
```
5252

@@ -63,7 +63,7 @@ Adding a `:project/run` alias to the project `deps.edn` file provides a simpler
6363

6464
Now the project code can be run using the simple command line form
6565

66-
```bash
66+
```shell
6767
clojure -M:project/run
6868
```
6969

@@ -97,7 +97,7 @@ If no -main function is found or the namespace is not specified, then a REPL ses
9797

9898
Use the `:repl/rebel` alias with the `-M` execution option
9999

100-
```bash
100+
```shell
101101
clojure -M:repl/rebel
102102
```
103103

@@ -109,7 +109,7 @@ Multiple aliases can be specified to include additional paths and libraries. Ali
109109

110110
Start a REPL process with this alias
111111

112-
```bash
112+
```shell
113113
clojure -M:env/dev:lib/hotload:repl/rebel
114114
```
115115

@@ -120,7 +120,7 @@ The Rebel REPL UI will start, include the dev directory on the class path and th
120120

121121
Alises can be used together by chaining their names on the command line
122122

123-
```bash
123+
```shell
124124
clojure -M:env/dev:lib/hotload:repl/rebel
125125
```
126126

@@ -139,13 +139,13 @@ Any function on the class path can be called and is passed a hash-map as an argu
139139

140140
Call the `status` function from the namespace `practicalli.service`, which is on the classpath in the practicalli.service project
141141

142-
```bash
142+
```shell
143143
clojure -X practicalli.service/status
144144
```
145145

146146
Pass arguments to a `start` function in the `practicalli.service` namespace
147147

148-
```bash
148+
```shell
149149
clojure -X practicalli.service/start :port 8080 :join? false
150150
```
151151

@@ -170,7 +170,7 @@ The `-T` execution option also uses the `clojure.exec` approach, although the `:
170170

171171
Calling Tools on the command line has the general form:
172172

173-
```bash
173+
```shell
174174
clojure -Ttool-name function-name :key "value" ,,,
175175
```
176176

@@ -183,27 +183,27 @@ key/value pairs can be passed as arguments to that function (as with the -X exec
183183

184184
In this example, the antq tool is installed using the name `antq`
185185

186-
```bash
186+
```shell
187187
clojure -Ttools install com.github.liquidz/antq '{:git/tag "1.3.1"}' :as antq
188188
```
189189

190190
Installing a tool adds an EDN configuration file using the name of the tool in `$XDG_HOME/.clojure/tools/` or `$HOME/.clojure/tools/` directory.
191191

192192
Once a tool is installed, run by using the name of the tool.
193193

194-
```bash
194+
```shell
195195
clojure -Tantq outdated
196196
```
197197

198198
Options to the tool are passed as key/value pairs (as the tool is called by clojure.exec)
199199

200-
```bash
200+
```shell
201201
clojure -Tantq outdated :upgrade true
202202
```
203203

204204
`-Ttools remove` will remove the configuration of the tool of the given name
205205

206-
```bash
206+
```shell
207207
clojure -Ttools remove :tool antq
208208
```
209209

@@ -265,13 +265,13 @@ If `:git` or `:local/root` dependencies are defined, the respective code will be
265265

266266
Prepare flag by itself download dependencies defined in the `:deps` section of the `deps.edn` file of the current project.
267267

268-
```bash
268+
```shell
269269
clojure -P
270270
```
271271

272272
Including one or more aliases will preparing all the dependencies from every alias specified
273273

274-
```bash
274+
```shell
275275
clojure -P -M:env/dev:lib/hotload:repl/cider
276276
```
277277

@@ -290,7 +290,7 @@ As prepare is essentially a dry run, then the `clojure` command does not call `:
290290
291291
The `:env/dev` alias adds "dev" directory to the class path, [typically used to add a `user.clj` that will automatically load code from the `user` namespace defined in that file](https://practical.li/clojure/clojure-cli/projects/configure-repl-startup.html).
292292

293-
```bash
293+
```shell
294294
clojure -A:env/dev
295295
```
296296

@@ -310,7 +310,7 @@ Aliases can be chained together and their configuration will be merged
310310

311311
Start a REPL process with this alias
312312

313-
```bash
313+
```shell
314314
clojure -A:env/dev:lib/hotload
315315
```
316316

docs/clojure-cli/practicalli-config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ All tools are provided via libraries and are only installed on first use. Unuse
8989

9090
Run project with or without an alias:
9191

92-
```bash
92+
```shell
9393
clojure -M:alias -m domain.app-name
9494
clojure -M -m domain.app-name
9595
```

0 commit comments

Comments
 (0)