on master help sign in
/# docs
commit3466e08c597f5e6668def610ebbfd2b274b19a9a authorTed Blackman <ted@tlon.io> dateWed 6 Sep 2017, 11:27 (9 years ago) parenta42d169
1 file changed+18
docs/arvo/internals/ford/runes.md+18
docs/arvo/internals/ford/runes.md+18
@@ -206,6 +206,24 @@ produces: `1`
206206
207207Without the cast, we wouldn't be able to access the 'i' face of the list.
208208
209+### `/#` insert dephash
210+
211+`/#` takes a horn and produces a cell of the dependency
212+hash of the result of the horn, and the result itself.
213+
214+Example:
215+```
216+/= inline /^ {dep/@uvH txt/@t} /# /: /%/my-script /js/
217+::
218+;= ;script: (trip txt.inline) :: set script contents
219+ ;script@"/~/on/{<dep.inline>}.js"; :: set script src
220+==
221+```
222+produces two `<script>` tags. The first has its contents set to the contents
223+of the JavaScript file we loaded from clay. The second is an auto-update
224+script that polls the server to check whether the dependency hash has changed.
225+This pattern is used in urbit's `tree` web publishing system.
226+
209227### `/+` import from lib/
210228
211229The `/+` rune accepts a filename as an argument. It interprets that filename