Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2ac915f

Browse files
2 parents 825227c + d5c276c commit 2ac915f

File tree

71 files changed

+2992
-976
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+2992
-976
lines changed

‎.github/workflows/check-snippets.yml‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,13 @@ jobs:
2222
with:
2323
node-version: 22
2424

25+
- name: Install dependencies
26+
run: npm ci
27+
2528
- name: Check if snippets are formated correctly
2629
uses: int128/comment-action@v1
2730
with:
28-
run: node utils/checkSnippetFormatting.js # Run the script located in the utils/ folder
31+
run: npx tsx utils/checkSnippetFormatting.ts # Run the script located in the utils/ folder
2932
post-on-failure: |
3033
## :x: Snippet Format Error
31-
${run.output}
34+
${run.output}

‎.github/workflows/consolidate-snippets.yml‎

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

‎.github/workflows/pre-commit-checks.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,8 @@ jobs:
2727
- name: Run lint
2828
run: npm run lint
2929

30+
- name: Run tests
31+
run: npm run test-ci
32+
3033
- name: Run build
3134
run: npm run build

‎.gitignore‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ lerna-debug.log*
1010
node_modules
1111
dist
1212
dist-ssr
13+
coverage
1314
*.local
1415
*.tsbuildinfo
1516

@@ -23,3 +24,7 @@ dist-ssr
2324
*.njsproj
2425
*.sln
2526
*.sw?
27+
28+
# Consolidated snippets
29+
public/consolidated
30+
public/icons

‎.husky/pre-commit‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
npm run snippets:check
12
npm run cspell
23
npm run lint
4+
npm run test-ci
35
npm run build

‎.prettierignore‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
node_modules
22
dist
3+
coverage
34
snippets
45
public
56
.vite
67
coverage
78
package-lock.json
8-
.md
9+
.md

‎CONTRIBUTING.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ Here’s an example for JavaScript:
117117
title: Format Date
118118
description: Formats a date in 'YYYY-MM-DD' format.
119119
author: dostonnabotov
120-
tags: javascript,date,format
120+
tags: date,format
121121
---
122122

123123
```js
@@ -141,11 +141,11 @@ console.log(formatDate(new Date())); // Output: '2024年12月10日'
141141
It will return nothing if they are well formatted, otherwise it will tell you what the error is.
142142
143143
---
144-
To preview the snippets, you need to consolidate them, use the `snippets:consolidate` script:
144+
To preview the snippets, start the vite server using:
145145
```
146-
$ npm run snippets:consolidate
146+
$ npm run dev
147147
```
148-
It will update the snippets in the `/public` folder, making them available to the frontend.
148+
It will use HMR to update the snippets in the `/public` folder, making them available to the frontend.
149149
150150
Expected file structure:
151151

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Here's an example for JavaScript:
6363
title: Format Date
6464
description: Formats a date in 'YYYY-MM-DD' format.
6565
author: dostonnabotov
66-
tags: javascript,date,format
66+
tags: date,format
6767
---
6868

6969
```js

‎cspell-dict.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
quicksnip
2+
slugified
23
slugifyed

‎cspell.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"ignorePaths": [
1212
"node_modules",
1313
"dist",
14+
"coverage",
1415
"public"
1516
]
1617
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /