Skip to content

Commit 117eb08

Browse files
Merge branch 'develop' into feat-cover-lifecycle
2 parents bcd1090 + 6552853 commit 117eb08

38 files changed

+4581
-4224
lines changed

.eslintignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
# Directories
12
.git
2-
**/*.md
33
build
4+
dist
45
docs
56
lib
67
node_modules
8+
9+
# Files
10+
**/*.md
711
server.js
8-
themes

.github/workflows/update-emoji.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Update Emoji
2+
3+
on:
4+
schedule:
5+
- cron: '0 2 * * *'
6+
workflow_dispatch:
7+
8+
concurrency:
9+
group: update-emoji-group
10+
11+
jobs:
12+
sync-emojis-from-github:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Setup Node.js v20
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: 20
21+
cache: 'npm'
22+
23+
- name: Install dependencies
24+
run: npm ci --ignore-scripts
25+
26+
- name: Fetch emojiData
27+
run: npm run build:emoji
28+
29+
- name: Check for changes
30+
run: |
31+
if git diff --quiet -- "src/core/render/emoji-data.js"; then
32+
echo "No changes Found. Skipping PR creation."
33+
else
34+
echo "Changes detected in emoji-data.js. Creating PR."
35+
36+
current_date=$(date +'%Y-%m-%d')
37+
38+
branch_name="update-emoji-data-$current_date"
39+
pr_title="update(emoji): Sync emoji data with GitHub emoji API [$current_date]"
40+
git config --global user.email "[email protected]"
41+
git config --global user.name "GitHub Actions"
42+
43+
git checkout -b $branch_name
44+
git add src/core/render/emoji-data.js
45+
git add docs/emoji.md
46+
git commit -m "update(emoji): Sync emoji data with GitHub emoji API [$current_date]"
47+
unique_branch_name=$branch_name-$(git log -1 --pretty=%h)
48+
git checkout -b $unique_branch_name
49+
git push origin $unique_branch_name
50+
gh pr create --title "$pr_title" --body "Found updated github emojis need to sync, PTAL @docsifyjs/reviewers :robot:." --base develop
51+
fi
52+
env:
53+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
.DS_Store
1+
# Directories
2+
.husky/_
23
.idea
4+
.vercel
5+
_playwright-report
6+
_playwright-results
7+
dist
8+
lib
9+
node_modules
10+
11+
# Files
12+
.DS_Store
313
*.log
4-
/_playwright-report
5-
/_playwright-results
6-
/lib
7-
/node_modules
8-
/.husky/_
914

10-
# exceptions
15+
# Exceptions
1116
!.gitkeep
12-
.vercel
13-

.prettierignore

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
# Directories
2+
_playwright-*
3+
dist
4+
lib
5+
6+
# Files
17
CHANGELOG.md
2-
HISTORY.md
3-
lib/
4-
themes/
5-
_playwright-*/
68
emoji-data.*
9+
HISTORY.md

babel.config.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
[
44
"@babel/preset-env",
55
{
6-
"targets": {
7-
"node": "current"
8-
}
6+
"targets": "defaults"
97
}
108
]
119
]

build/build.js

Lines changed: 0 additions & 159 deletions
This file was deleted.

build/css.js

Lines changed: 0 additions & 48 deletions
This file was deleted.

build/emoji.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,9 @@ function writeEmojiJS(emojiData) {
9595

9696
console.info('Build emoji');
9797

98-
try {
99-
const emojiData = await getEmojiData();
98+
const emojiData = await getEmojiData();
10099

101-
if (emojiData) {
102-
writeEmojiPage(emojiData);
103-
writeEmojiJS(emojiData);
104-
}
105-
} catch (err) {
106-
console.warn(`- Error: ${err.message}`);
107-
}
100+
writeEmojiPage(emojiData);
101+
writeEmojiJS(emojiData);
102+
103+
console.info('Finish update');

build/mincss.js

Lines changed: 0 additions & 21 deletions
This file was deleted.

build/release.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ if [[ $REPLY =~ ^[Yy]$ ]]; then
1515
# build
1616
VERSION=$VERSION npm run build
1717

18-
# TODO
19-
# npm test
18+
# test
19+
npm run test
2020

2121
# commit
2222
git add -A

0 commit comments

Comments
 (0)