Skip to content

Commit 0c60c6d

Browse files
add --hash flag docs
1 parent 08a0674 commit 0c60c6d

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Hash
2+
3+
> Hash is a unique id indicator just like `--id`, but for a asset such as vector & images
4+
5+
## Allowed on
6+
7+
- layer with single image fill (a image)
8+
- a vector layer
9+
10+
## Use with `--main`
11+
12+
```
13+
vector layer 1 --hash=my-brand-logo
14+
vector layer 2 --hash=my-brand-logo --main
15+
```
16+
17+
Now vector 1 & 2 will use the same svg data, based on vector 2's svg data (since it's marked with `--main`).
18+
19+
- do - set one layer as main
20+
- don't - set multiple layer with same hash with main (will show warning)
21+
- don't - no main layer specified - will use the first hit item.
22+
23+
## See also
24+
25+
- [`--id`](../--id/README.md)

packages/support-flags/--id/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,7 @@ by specifing the id flag, you can take advantage in below scenarios.
88
- id="value" on generated html output.
99

1010
<!-- TODO: provide more realworld usecase -->
11+
12+
## See also
13+
14+
- [`--hash`](../--hash/README.md)

0 commit comments

Comments
 (0)