mirror of
https://github.com/quartz-community/syntax-highlighting.git
synced 2026-07-22 02:50:27 +00:00
chore: updated CI
This commit is contained in:
parent
329d6c5ad6
commit
a327da5f86
2 changed files with 16 additions and 6 deletions
11
.github/workflows/ci.yml
vendored
11
.github/workflows/ci.yml
vendored
|
|
@ -28,6 +28,15 @@ jobs:
|
|||
- name: Build
|
||||
run: npm run build
|
||||
|
||||
- name: Verify dist is up to date
|
||||
run: |
|
||||
if git diff --quiet dist/; then
|
||||
echo "dist/ is up to date"
|
||||
else
|
||||
echo "::error::dist/ is stale. Run 'npm run build' and commit the result."
|
||||
git diff --stat dist/
|
||||
exit 1
|
||||
fi
|
||||
- name: Verify dist externals
|
||||
run: |
|
||||
node -e "
|
||||
|
|
@ -37,7 +46,7 @@ jobs:
|
|||
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf-8'));
|
||||
const peerDeps = Object.keys(pkg.peerDependencies || {});
|
||||
const builtins = new Set(['assert','buffer','child_process','cluster','console','constants','crypto','dgram','dns','domain','events','fs','http','http2','https','inspector','module','net','os','path','perf_hooks','process','punycode','querystring','readline','repl','stream','string_decoder','sys','timers','tls','trace_events','tty','url','util','v8','vm','wasi','worker_threads','zlib']);
|
||||
const shared = ['@quartz-community/','preact','@jackyzha0/quartz','vfile'];
|
||||
const shared = ['@quartz-community/','preact','@jackyzha0/quartz','vfile','unified'];
|
||||
const content = fs.readFileSync(dist, 'utf-8');
|
||||
const re = /^\s*(?:import\s+.*\s+from|export\s+.*\s+from)\s+[\"']([^\"'./][^\"']*)[\"']/gm;
|
||||
const unexpected = new Set();
|
||||
|
|
|
|||
11
README.md
11
README.md
|
|
@ -34,11 +34,12 @@ ExternalPlugin.SyntaxHighlighting({
|
|||
|
||||
## Configuration
|
||||
|
||||
| Option | Type | Default | Description |
|
||||
| ---------------- | --------------------------------------- | ------------------------------------------------ | ------------------------------------------------------- |
|
||||
| `theme` | `{ light: CodeTheme, dark: CodeTheme }` | `{ light: "github-light", dark: "github-dark" }` | The theme to use for syntax highlighting. |
|
||||
| `keepBackground` | `boolean` | `false` | Whether to keep the background color of the code block. |
|
||||
| `clipboard` | `boolean` | `true` | Whether to add a clipboard copy button to code blocks. |
|
||||
| Option | Type | Default | Description |
|
||||
| --------------------- | --------------------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `theme` | `{ light: CodeTheme, dark: CodeTheme }` | `{ light: "github-light", dark: "github-dark" }` | The theme to use for syntax highlighting. |
|
||||
| `keepBackground` | `boolean` | `false` | Whether to keep the background color of the code block. |
|
||||
| `clipboard` | `boolean` | `true` | Whether to add a clipboard copy button to code blocks. |
|
||||
| `tokenClassification` | `boolean` | `true` | Adds `data-token-type` attributes (keyword, string, comment, etc.) to token spans. Enables theme-aware code styling via CSS selectors. |
|
||||
|
||||
## Documentation
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue