From 95b260a08c4bfb82c2501244620cb61cb50a0e41 Mon Sep 17 00:00:00 2001 From: Chris Zuber Date: Mon, 14 Oct 2024 16:45:23 -0700 Subject: [PATCH] Update Super Linter & add markdown example --- .github/workflows/super-linter.yml | 2 +- package-lock.json | 95 ++++++++++++++++++++++++++++-- package.json | 1 + test/index.html | 7 ++- test/index.js | 1 + test/views/markdown.js | 9 +++ 6 files changed, 109 insertions(+), 6 deletions(-) create mode 100644 test/views/markdown.js diff --git a/.github/workflows/super-linter.yml b/.github/workflows/super-linter.yml index 30bc516..a33874c 100644 --- a/.github/workflows/super-linter.yml +++ b/.github/workflows/super-linter.yml @@ -87,7 +87,7 @@ jobs: # Valate Languages - Uncomment to Enable # JS/TS/JSON Disabled until ESLint in super-linter is updated - VALIDATE_HTML: true + # VALIDATE_HTML: true VALIDATE_CSS: true # VALIDATE_JAVASCRIPT_ES: true # VALIDATE_JAVASCRIPT_STANDARD: true diff --git a/package-lock.json b/package-lock.json index bc25596..b6d9bf6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { - "name": "npm-template", - "version": "1.1.1", + "name": "@aegisjsproject/router", + "version": "1.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "npm-template", - "version": "1.1.1", + "name": "@aegisjsproject/router", + "version": "1.0.0", "funding": [ { "type": "librepay", @@ -21,6 +21,7 @@ "devDependencies": { "@aegisjsproject/component": "^0.1.4", "@aegisjsproject/core": "^0.2.15", + "@aegisjsproject/markdown": "^0.1.3", "@aegisjsproject/state": "^1.0.0", "@rollup/plugin-node-resolve": "^15.3.0", "@shgysk8zer0/eslint-config": "^1.0.1", @@ -79,6 +80,31 @@ "node": ">=18.0.0" } }, + "node_modules/@aegisjsproject/markdown": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@aegisjsproject/markdown/-/markdown-0.1.3.tgz", + "integrity": "sha512-ENEnwaD1n3LnGZO9cdMQlmulpsIwZ5VLXUvE/QO19wvWH71W/0jgByobfEd7H6w5KeVaXmG42ZThjuN9pu5Ktw==", + "dev": true, + "funding": [ + { + "type": "librepay", + "url": "https://liberapay.com/shgysk8zer0" + }, + { + "type": "github", + "url": "https://github.com/sponsors/shgysk8zer0" + } + ], + "dependencies": { + "@aegisjsproject/core": "^0.2.0", + "@highlightjs/cdn-assets": "^11.9.0", + "marked": "^14.0.0", + "marked-highlight": "^2.1.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/@aegisjsproject/parsers": { "version": "0.0.10", "resolved": "https://registry.npmjs.org/@aegisjsproject/parsers/-/parsers-0.0.10.tgz", @@ -309,6 +335,15 @@ "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, + "node_modules/@highlightjs/cdn-assets": { + "version": "11.10.0", + "resolved": "https://registry.npmjs.org/@highlightjs/cdn-assets/-/cdn-assets-11.10.0.tgz", + "integrity": "sha512-vWXpu+Rdm0YMJmugFdUiL/9DmgYjEiV+d5DBqlXdApnGPSIeo6+LRS5Hpx6fvVsKkvR4RsLYD9rQ6DOLkj7OKA==", + "dev": true, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/@humanfs/core": { "version": "0.19.0", "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.0.tgz", @@ -1543,6 +1578,27 @@ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, + "node_modules/marked": { + "version": "14.1.2", + "resolved": "https://registry.npmjs.org/marked/-/marked-14.1.2.tgz", + "integrity": "sha512-f3r0yqpz31VXiDB/wj9GaOB0a2PRLQl6vJmXiFrniNwjkKdvakqJRULhjFKJpxOchlCRiG5fcacoUZY5Xa6PEQ==", + "dev": true, + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/marked-highlight": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/marked-highlight/-/marked-highlight-2.1.4.tgz", + "integrity": "sha512-D1GOkcdzP+1dzjoColL7umojefFrASDuLeyaHS0Zr/Uo9jkr1V6vpLRCzfi1djmEaWyK0SYMFtHnpkZ+cwFT1w==", + "dev": true, + "peerDependencies": { + "marked": ">=4 <15" + } + }, "node_modules/mime": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", @@ -2065,6 +2121,18 @@ "@aegisjsproject/trusted-types": "^1.0.1" } }, + "@aegisjsproject/markdown": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@aegisjsproject/markdown/-/markdown-0.1.3.tgz", + "integrity": "sha512-ENEnwaD1n3LnGZO9cdMQlmulpsIwZ5VLXUvE/QO19wvWH71W/0jgByobfEd7H6w5KeVaXmG42ZThjuN9pu5Ktw==", + "dev": true, + "requires": { + "@aegisjsproject/core": "^0.2.0", + "@highlightjs/cdn-assets": "^11.9.0", + "marked": "^14.0.0", + "marked-highlight": "^2.1.0" + } + }, "@aegisjsproject/parsers": { "version": "0.0.10", "resolved": "https://registry.npmjs.org/@aegisjsproject/parsers/-/parsers-0.0.10.tgz", @@ -2186,6 +2254,12 @@ "levn": "^0.4.1" } }, + "@highlightjs/cdn-assets": { + "version": "11.10.0", + "resolved": "https://registry.npmjs.org/@highlightjs/cdn-assets/-/cdn-assets-11.10.0.tgz", + "integrity": "sha512-vWXpu+Rdm0YMJmugFdUiL/9DmgYjEiV+d5DBqlXdApnGPSIeo6+LRS5Hpx6fvVsKkvR4RsLYD9rQ6DOLkj7OKA==", + "dev": true + }, "@humanfs/core": { "version": "0.19.0", "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.0.tgz", @@ -3017,6 +3091,19 @@ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, + "marked": { + "version": "14.1.2", + "resolved": "https://registry.npmjs.org/marked/-/marked-14.1.2.tgz", + "integrity": "sha512-f3r0yqpz31VXiDB/wj9GaOB0a2PRLQl6vJmXiFrniNwjkKdvakqJRULhjFKJpxOchlCRiG5fcacoUZY5Xa6PEQ==", + "dev": true + }, + "marked-highlight": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/marked-highlight/-/marked-highlight-2.1.4.tgz", + "integrity": "sha512-D1GOkcdzP+1dzjoColL7umojefFrASDuLeyaHS0Zr/Uo9jkr1V6vpLRCzfi1djmEaWyK0SYMFtHnpkZ+cwFT1w==", + "dev": true, + "requires": {} + }, "mime": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", diff --git a/package.json b/package.json index 27e8c97..19ae71f 100644 --- a/package.json +++ b/package.json @@ -80,6 +80,7 @@ "devDependencies": { "@aegisjsproject/component": "^0.1.4", "@aegisjsproject/core": "^0.2.15", + "@aegisjsproject/markdown": "^0.1.3", "@aegisjsproject/state": "^1.0.0", "@rollup/plugin-node-resolve": "^15.3.0", "@shgysk8zer0/eslint-config": "^1.0.1", diff --git a/test/index.html b/test/index.html index 55f1432..7bb92a8 100644 --- a/test/index.html +++ b/test/index.html @@ -11,7 +11,11 @@ "imports": { "@aegisjsproject/": "../node_modules/@aegisjsproject/", "@aegisjsproject/router": "../router.js", - "@aegisjsproject/router/": "../" + "@aegisjsproject/router/": "../", + "@highlightjs/cdn-assets/": "https://unpkg.com/@highlightjs/cdn-assets@11.10.0/es/", + "marked": "https://unpkg.com/marked@14.1.2/lib/marked.esm.js", + "marked-highlight": "https://unpkg.com/marked-highlight@2.1.4/src/index.js", + "highlight.js/": "https://unpkg.com/@highlightjs/cdn-assets@11.10.0/es/" } } @@ -27,6 +31,7 @@ Product 3 + Markdown Test diff --git a/test/index.js b/test/index.js index 86465b3..5486459 100644 --- a/test/index.js +++ b/test/index.js @@ -4,6 +4,7 @@ globalThis.controller = new AbortController(); init({ '/product/:productId': '@aegisjsproject/router/test/views/product.js', + '/page/markdown': '@aegisjsproject/router/test/views/markdown.js', '/test/': '@aegisjsproject/router/test/views/home.js', '/search?q=:query': '@aegisjsproject/router/test/views/search.js', '/img': '@aegisjsproject/router/test/views/img.js', diff --git a/test/views/markdown.js b/test/views/markdown.js new file mode 100644 index 0000000..3224e92 --- /dev/null +++ b/test/views/markdown.js @@ -0,0 +1,9 @@ +import { md } from '@aegisjsproject/markdown/markdown.js'; + +export default md` + ## This is a mardown example. + + Go back to [home](/test/) + + ![missing image](https://cdn.kernvalley.us/img/raster/missing-image.png) +`;