Skip to content

Commit

Permalink
Add script for writing anki structured content css (#1706)
Browse files Browse the repository at this point in the history
* Add script for writing anki structured content css

* Add docs in npm-scripts.md

* Note where anki structured content rules come from

* Fix formatting inconsistency
  • Loading branch information
Kuuuube authored Dec 27, 2024
1 parent 7d4ae00 commit 4b97a01
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/development/npm-scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
This file documents the scripts available in the [package.json](../../package.json) file.
Scripts can be executed by running `npm run <name>`.

- `anki:css-json:write`

Writes Anki structured content styling json for use when sending stuctured content dictionaries to Anki.

CSS rules are taken from `ext/css/structured-content.css` and converted into json.

CSS rule overrides and exclusions can be set in `dev/data/structured-content-overrides.css`.

- `bench`
Runs performance benchmarks.

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
},
"type": "module",
"scripts": {
"anki:css-json:write": "node ./dev/bin/generate-css-json.js --dryRun --all",
"bench": "vitest bench",
"build": "node ./dev/bin/build.js",
"build:libs": "node ./dev/bin/build-libs.js",
Expand Down

0 comments on commit 4b97a01

Please sign in to comment.