Skip to content
This repository was archived by the owner on May 29, 2023. It is now read-only.

Commit ba90567

Browse files
authored
feat: update workflow and fix some errors (#5)
1 parent a520db6 commit ba90567

6 files changed

+13
-9
lines changed

. prettierignore .prettierignore

File renamed without changes.

.prettierrc.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"trailingComma": "es5",
3-
"tabWidth": 2,
4-
"semi": false,
5-
"singleQuote": false
6-
}
2+
"trailingComma": "es5",
3+
"tabWidth": 2,
4+
"semi": true,
5+
"singleQuote": false
6+
}

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@
55
### Classical
66

77
```md
8-
https:/cdn.jsdelivr.net/gh/onemoon/rule-sets/black-list/lp-private.classical.yaml
8+
https:/cdn.jsdelivr.net/gh/onemoon/rule-sets@latest/src/black-list/lp-private.classical.yaml
99
```
1010

1111
### Domain
1212

1313
```md
14-
https:/cdn.jsdelivr.net/gh/onemoon/rule-sets/black-list/lp-private.domain.yaml
14+
https:/cdn.jsdelivr.net/gh/onemoon/rule-sets@latest/src/black-list/lp-private.domain.yaml
1515
```
1616

1717
### Ipcidr
1818

1919
```md
20-
https:/cdn.jsdelivr.net/gh/onemoon/rule-sets/black-list/lp-private.ipcidr.yaml
20+
https:/cdn.jsdelivr.net/gh/onemoon/rule-sets@latest/src/black-list/lp-private.ipcidr.yaml
2121
```
2222

2323
## Software

package-lock.json

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
},
2020
"homepage": "https://github.com/onemoon/rule-sets#readme",
2121
"devDependencies": {
22+
"chalk": "^5.2.0",
2223
"commitizen": "^4.3.0",
2324
"cz-conventional-changelog": "^3.3.0",
2425
"prettier": "2.8.8",

scripts/update-links.mjs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import chalk from "chalk";
12
import {
23
readFile,
34
readFileSync,
@@ -18,7 +19,7 @@ const jsdelivrHost = "https://cdn.jsdelivr.net/gh/onemoon";
1819

1920
// Get package's name
2021
const packageContent = readFileSync(packagePath);
21-
const projectName = JSON.parse(packageContent).name;
22+
const projectName = JSON.parse(packageContent).name + "@latest";
2223

2324
// Get rule-set's path
2425
const ruleSetFile = readdirSync(blackListPath).filter(
@@ -68,6 +69,7 @@ readdir(directoryPath, (err, files) => {
6869
);
6970
// console.log(replacedContent);
7071
writeFileSync(filePath, replacedContent, "utf8");
72+
console.log(chalk.greenBright("Update readme successfully 🎉 ⚡️"));
7173
});
7274
});
7375
});

0 commit comments

Comments
 (0)