-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathassets.ss
More file actions
35 lines (28 loc) · 808 Bytes
/
assets.ss
File metadata and controls
35 lines (28 loc) · 808 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
```code
* Update /assets gists *
* Usage: x run assets.ss <id>? *
{{
{
nuglify: '4bdb79d21f199c22b8a86f032c186e2d',
}
| to => gistMap
}}
[] | to => optional
[] | to => ignore
(ARGV.Length > 0 ? ARGV : gistMap.Keys) | to => keys
#each id in keys
gistMap[id] | to => gistId
{} | to => files
vfsFileSystem(`assets/${id}`) | to => fs
#each file in fs.allFiles()
file.VirtualPath.replace('/','\\') | to => key
(optional.contains(key) ? `${key}?` : key) | to => key
#if !ignore.contains(key)
files.putItem(key, file.fileContents()) | end
/if
/each
`Writing to ${files.count()} files to ${id} ${gistId} ...`
vfsGist(gistId, 'GISTLYN_TOKEN'.envVariable()) | to => gist
gist.writeFiles(files)
/each
```