Skip to content

Commit fdcba3e

Browse files
authored
Update caching.md
Minor fixes to correct a build error.
1 parent b5613a6 commit fdcba3e

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

jekyll/_cci2/caching.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,11 @@ There are many different approaches to utilizing caching in monorepos. The custo
112112

113113
1) Add custom command to config:
114114

115-
```
116-
commands:
117-
create_concatenated_package_lock:
118-
description: "Concatenate all package-lock.json files recognized by lerna.js into single file. File is used as checksum source for part of caching key."
115+
{% raw %}
116+
```yaml
117+
commands:
118+
create_concatenated_package_lock:
119+
description: "Concatenate all package-lock.json files recognized by lerna.js into single file. File is used as checksum source for part of caching key."
119120
parameters:
120121
filename:
121122
type: string
@@ -124,19 +125,23 @@ commands:
124125
name: Combine package-lock.json files to single file
125126
command: npx lerna list -p -a | awk -F packages '{printf "\"packages%s/package-lock.json\" ", $2}' | xargs cat > << parameters.filename >>
126127
```
128+
{% endraw %}
129+
127130
2) Use custom command in build to generate the concatenated `package-lock` file
128131

129-
```
132+
{% raw %}
133+
```yaml
130134
steps:
131-
- checkout
132-
- create_concatenated_package_lock:
135+
- checkout
136+
- create_concatenated_package_lock:
133137
filename: combined-package-lock.txt
134-
Use combined-package-lock.text in cache key
135-
- restore_cache:
138+
Use combined-package-lock.text in cache key
139+
- restore_cache:
136140
keys:
137141
- v3-deps-{{ checksum "package-lock.json" }}-{{ checksum "combined-package-lock.txt" }}
138142
- v3-deps
139143
```
144+
{% endraw %}
140145

141146
## Managing Caches
142147

0 commit comments

Comments
 (0)