pnpm.io
pnpm.io copied to clipboard
Filter introduction suggestions
After reading useage of filtering multiple times, I found some filter usage rules. It had three key elements and two operators: Elements list
- package-name
- dir-name
- git(commitId or branch)
Two operators
- ... ellipsis
- ^
element(except dir-name
) and operators can be mixed, like this:<operators>{package-name}<operators>
. It had 20 combinations like this:
only package-name:(just 1)
1.package-name
package-name with one operator(4 situations):
2. ...package-name
3. package-name...
4. ^package-name
5. package-name^
package-name with two operator(6 situations):
6. ...package-name...
7. ^package-name^
8. ...^package-name
,
9. ...package-name^
10. package-name^...
11. ^package-name...
package-name with three operator(8 situations) ...balabala...
package-name with four operator(1 situations)
...^package-name^...
It's very interesting and easy to get all combinations. So I think filter
can be grouped by elements
and operators
, it's a good way to learn.