We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 19c9437 + 8743f53 commit 0e08ae1Copy full SHA for 0e08ae1
.github/workflows/consolidate-snippets.yml
@@ -35,5 +35,5 @@ jobs:
35
git config --global user.email "action@github.com"
36
git add public/consolidated/*
37
git add public/icons/*
38
- git commit -m "Update consolidated snippets"
+ git diff-index --quiet HEAD || git commit -m "Update consolidated snippets"
39
git push
.github/workflows/pre-commit-checks.yml
@@ -0,0 +1,31 @@
1
+name: Pre-commit checks
2
+
3
+on:
4
+ pull_request:
5
+ branches:
6
+ - '**'
7
8
+jobs:
9
+ pre-commit-checks:
10
+ runs-on: ubuntu-latest
11
12
+ steps:
13
+ - name: Checkout repository
14
+ uses: actions/checkout@v4
15
16
+ - name: Set up Node.js
17
+ uses: actions/setup-node@v4
18
+ with:
19
+ node-version: 22
20
21
+ - name: Install dependencies
22
+ run: npm ci
23
24
+ - name: Run cspell
25
+ run: npm run cspell
26
27
+ - name: Run lint
28
+ run: npm run lint
29
30
+ - name: Run build
31
+ run: npm run build
.husky/pre-commit
@@ -1,2 +1,3 @@
+npm run cspell
npm run lint
npm run build
.prettierignore
@@ -1,5 +1,7 @@
node_modules
dist
+snippets
+public
.vite
coverage
package-lock.json
CONTRIBUTING.md
@@ -79,7 +79,19 @@ console.log(formatDate(new Date())); // Output: '2024年12月10日'
79
- Specify the language after the first set of backticks for syntax highlighting.
80
81
6. **Test your snippet:**
82
- - Ensure your code runs as expected.
+ - Ensure your code runs as expected. \
83
+ To test that your snippets are formatted correctly use the `snippets:check` script:
84
+ ```
85
+ $ npm run snippets:check
86
87
+ It will return nothing if they are well formatted, otherwise it will tell you what the error is.
88
89
+ ---
90
+ To preview the snippets, you need to consolidate them, use the `snippets:consolidate` script:
91
92
+ $ npm run snippets:consolidate
93
94
+ It will update the snippets in the `/public` folder, making them available to the frontend.
95
96
Expected file structure:
97
README.md
@@ -80,6 +80,19 @@ Expected file structure:
> Please do **NOT** add or edit anything in `/public` folder. It will be used for consolidating snippets.
+To test that your snippets are formatted correctly use the `snippets:check` script:
+```
+$ npm run snippets:check
+It will return nothing if they are well formatted, otherwise it will tell you what the error is.
+---
+To preview the snippets, you need to consolidate them, use the `snippets:consolidate` script:
+$ npm run snippets:consolidate
+It will update the snippets in the `/public` folder, making them available to the frontend.
For more details about adding new categories or programming languages, check out the [CONTRIBUTING.md](/CONTRIBUTING.md) file.
98
## Guidelines for Contributions
cspell-dict.txt
@@ -0,0 +1 @@
+quicksnip
cspell.json
@@ -0,0 +1,16 @@
+{
+ "dictionaryDefinitions": [
+ {
+ "name": "workspace",
+ "path": "./cspell-dict.txt",
+ "description": "Custom Workspace Dictionary",
+ "addWords": true
+ }
+ ],
+ "dictionaries": ["workspace"],
+ "ignorePaths": [
+ "node_modules",
+ "dist",
+ "public"
+ ]
+}
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments