Skip to content

Commit

Permalink
feat: add sphinx-external-toc package
Browse files Browse the repository at this point in the history
  • Loading branch information
agoose77 committed Mar 5, 2024
1 parent 58ca715 commit 6bc4245
Show file tree
Hide file tree
Showing 13 changed files with 752 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ _build
yalc.lock

*.docx
schemas/
148 changes: 145 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,8 @@
"npm": ">=7.0.0",
"node": ">=14.0.0"
},
"packageManager": "npm@8.10.0"
"packageManager": "npm@8.10.0",
"dependencies": {
"json2ts": "^0.0.7"
}
}
4 changes: 4 additions & 0 deletions packages/sphinx-external-toc/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
root: true,
extends: ['curvenote'],
};
1 change: 1 addition & 0 deletions packages/sphinx-external-toc/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/src/schema.json
3 changes: 3 additions & 0 deletions packages/sphinx-external-toc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# sphinx-external-toc

Utilities to parse a JupyterBook \_toc.yml
42 changes: 42 additions & 0 deletions packages/sphinx-external-toc/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"name": "sphinx-external-toc",
"version": "0.0.0",
"sideEffects": false,
"license": "MIT",
"description": "sphinx-external-toc Table of Contents types and validation",
"author": "Angus Hollands <goosey15@gmail.com>",
"homepage": "https://github.com/executablebooks/mystmd/tree/main/packages/sphinx-external-toc",
"type": "module",
"exports": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/executablebooks/mystmd.git"
},
"scripts": {
"clean": "rimraf dist ./src/schema.json",
"lint": "eslint \"src/**/!(*.spec).ts\" -c ./.eslintrc.cjs",
"lint:format": "npx prettier --check \"src/**/*.ts\"",
"test": "vitest run",
"test:watch": "vitest watch",
"build:esm": "tsc",
"build:schema": "npx ts-json-schema-generator --path src/types.ts --type TOC -o ./src/schema.json",
"build": "npm-run-all -s -l clean build:schema build:esm"
},
"bugs": {
"url": "https://github.com/executablebooks/mystmd/issues"
},
"dependencies": {
"ajv": "^8.12.0",
"js-yaml": "^4.1.0"
},
"devDependencies": {
"ts-json-schema-generator": "^1.5.0"
}
}
2 changes: 2 additions & 0 deletions packages/sphinx-external-toc/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './toc.js';
export * from './types.js';

0 comments on commit 6bc4245

Please sign in to comment.