Skip to content

Commit

Permalink
Use latest astro-adocx package
Browse files Browse the repository at this point in the history
  • Loading branch information
sransara committed Jul 8, 2024
1 parent 3fadcdf commit b75a0a1
Show file tree
Hide file tree
Showing 14 changed files with 37 additions and 36 deletions.
2 changes: 1 addition & 1 deletion adocx/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import path from 'node:path';

// @ts-ignore: Types are not available
import { register as krokiPluginRegisterHandle } from 'asciidoctor-kroki';
import type { AdocOptions, AstroAdocxOptions, Template } from '@sransara/astro-adocx/types';
import type { AdocOptions, AstroAdocxOptions, Template } from '@sransara/astro-adocx/types.js';

import { register as inlineMacroCalloutRegisterHandle } from './extensions/inlineMacroCallout';

Expand Down
2 changes: 1 addition & 1 deletion adocx/extensions/inlineMacroCallout.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Extensions } from 'asciidoctor';

import { isExtensionSingleton } from '@sransara/astro-adocx/types';
import { isExtensionSingleton } from '@sransara/astro-adocx/types.js';

export function register(registry: typeof Extensions | Extensions.Registry) {
if (isExtensionSingleton(registry)) {
Expand Down
4 changes: 2 additions & 2 deletions adocx/templates/inline_quoted.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Inline } from 'asciidoctor';
import { UnsupportedNode, type Template } from '@sransara/astro-adocx/types';
import { addOnceToAstroFence } from '@sransara/astro-adocx/utils/astroFence';
import { UnsupportedNode, type Template } from '@sransara/astro-adocx/types.js';
import { addOnceToAstroFence } from '@sransara/astro-adocx/utils/astroFence.js';

export const convert: Template<Inline>['convert'] = (node: Inline, _opts?: any) => {
const nodeType = node.getType();
Expand Down
6 changes: 3 additions & 3 deletions adocx/templates/listing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
// - https://github.com/asciidoctor/asciidoctor-backends/blob/master/erb/html5/block_math.html.erb

import type { Block } from 'asciidoctor';
import { type Template } from '@sransara/astro-adocx/types';
import { addOnceToAstroFence } from '@sransara/astro-adocx/utils/astroFence';
import { atag } from '@sransara/astro-adocx/utils/asx';
import { type Template } from '@sransara/astro-adocx/types.js';
import { addOnceToAstroFence } from '@sransara/astro-adocx/utils/astroFence.js';
import { atag } from '@sransara/astro-adocx/utils/asx.js';

export const convert: Template<Block>['convert'] = (node: Block, _opts?: any) => {
const id = node.getId();
Expand Down
6 changes: 3 additions & 3 deletions adocx/templates/stem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
// - https://github.com/asciidoctor/asciidoctor-backends/blob/master/erb/html5/block_math.html.erb

import type { Block } from 'asciidoctor';
import { type Template } from '@sransara/astro-adocx/types';
import { addOnceToAstroFence } from '@sransara/astro-adocx/utils/astroFence';
import { atag } from '@sransara/astro-adocx/utils/asx';
import { type Template } from '@sransara/astro-adocx/types.js';
import { addOnceToAstroFence } from '@sransara/astro-adocx/utils/astroFence.js';
import { atag } from '@sransara/astro-adocx/utils/asx.js';

export const convert: Template<Block>['convert'] = (node: Block, _opts?: any) => {
const id = node.getId();
Expand Down
2 changes: 1 addition & 1 deletion astro.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import sitemap from '@astrojs/sitemap';
import solid from '@astrojs/solid-js';
import tailwind from '@astrojs/tailwind';
import { adocx } from '@sransara/astro-adocx/integration';
import { adocx } from '@sransara/astro-adocx/integration.js';
import { defineConfig } from 'astro/config';

import { adocxConfig, asciidoctorConfig } from './adocx/config';
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@astrojs/solid-js": "^4.4.0",
"@astrojs/tailwind": "^5.1.0",
"@eslint/js": "^9.6.0",
"@sransara/astro-adocx": "^0.0.10",
"@sransara/astro-adocx": "^0.0.12",
"@types/eslint": "^8.56.10",
"@types/eslint__js": "^8.42.3",
"@types/katex": "^0.16.7",
Expand All @@ -38,7 +38,7 @@
"postcss-load-config": "^6.0.1",
"prettier": "^3.3.2",
"prettier-plugin-astro": "^0.14.0",
"prettier-plugin-organize-imports": "^3.2.4",
"prettier-plugin-organize-imports": "^4.0.0",
"prettier-plugin-tailwindcss": "^0.6.5",
"sharp": "^0.33.4",
"shiki": "^1.10.3",
Expand Down
36 changes: 18 additions & 18 deletions pnpm-lock.yaml

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

1 change: 1 addition & 0 deletions src/env.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/// <reference types="astro/client" />
/// <reference types="vite/client" />
2 changes: 1 addition & 1 deletion src/layouts/adocNoteLayout/AdocNoteLayout.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
import type { ImageMetadata } from 'astro';
import type { Outline } from '@sransara/astro-adocx/utils/outline';
import type { Outline } from '@sransara/astro-adocx/utils/outline.js';
import type { Metadata } from '@/src/lib/types/notes';
import NoteLayout from '@/src/layouts/noteLayout/NoteLayout.astro';
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/noteLayout/NoteLayout.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
import { Image } from 'astro:assets';
import type { ImageMetadata } from 'astro';
import type { Outline } from '@sransara/astro-adocx/utils/outline';
import type { Outline } from '@sransara/astro-adocx/utils/outline.js';
import siteValues from '@/site.values.js';
import type { Metadata } from '@/src/lib/types/notes';
Expand Down
2 changes: 1 addition & 1 deletion src/lib/astro/codeListing/CodeListing.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
import { codeToHtml, bundledLanguages } from 'shiki';
import { decodeSpecialChars } from '@sransara/astro-adocx/utils/string';
import { decodeSpecialChars } from '@sransara/astro-adocx/utils/string.js';
interface Props {
lang: string;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/astro/mathtex/Mathtex.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
import AsciiMathParser from 'asciimath2tex';
import { decodeSpecialChars } from '@sransara/astro-adocx/utils/string';
import { decodeSpecialChars } from '@sransara/astro-adocx/utils/string.js';
import katex, { type KatexOptions } from 'katex';
import 'katex/dist/katex.min.css';
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"checkJs": true,
"jsx": "preserve",
"jsxImportSource": "solid-js",
"jsxImportSource": "solid-js"
},
"exclude": [
"dist"
Expand Down

0 comments on commit b75a0a1

Please sign in to comment.