mirror of
https://github.com/lainbo/component-party.git
synced 2026-04-05 04:59:02 +08:00
feat: change alias path
This commit is contained in:
@@ -311,4 +311,4 @@ This project requires Node.js to be `v14.0.0` or higher, because we use new Java
|
||||
1. Fork the project and create a new branch
|
||||
2. Add the new framework SVG logo in `public/framework`
|
||||
3. Install the ESLint plugin associated to the framework
|
||||
4. In `frameworks.mjs`, add a new entry with SVG link and ESLint configuration
|
||||
4. In `src/frameworks.mjs`, add a new entry with SVG link and ESLint configuration
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { getHighlighter } from '@components/CodeHighlight/Shiki.js';
|
||||
import { getHighlighter } from '@/components/CodeHighlight/Shiki.js';
|
||||
|
||||
export default async function astroHighlightCode({ code, lang = 'plaintext', theme = 'github-dark', wrap = false }) {
|
||||
/** Replace the shiki class name with a custom astro class name. */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
import FileCode from '@components/FileCode.astro';
|
||||
import FileCode from '@/components/FileCode.astro';
|
||||
|
||||
const { path, editHref } = Astro.props
|
||||
---
|
||||
|
||||
@@ -3,7 +3,7 @@ import fs from 'node:fs/promises';
|
||||
import nodePath from 'node:path';
|
||||
import { createFileMapCache } from 'micache';
|
||||
|
||||
import astroHighlightCode from '@components/CodeHighlight/astroHighlightCode.js';
|
||||
import astroHighlightCode from '@/components/CodeHighlight/astroHighlightCode.js';
|
||||
|
||||
const { path, lang, theme = 'github-dark', wrap = false } = Astro.props;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
import FRAMEWORKS from '@config/frameworks.mjs';
|
||||
import FRAMEWORKS from '@/frameworks.mjs';
|
||||
|
||||
const {id, size = 20} = Astro.props
|
||||
|
||||
|
||||
@@ -4,13 +4,13 @@ import kebabCase from 'lodash.kebabcase'
|
||||
import { Markdown } from 'astro/components'
|
||||
import nodePath from 'node:path'
|
||||
|
||||
import Title from '@components/Title.svelte'
|
||||
import FrameworkLabel from '@components/FrameworkLabel.astro'
|
||||
import FRAMEWORKS from '@config/frameworks.mjs'
|
||||
import CodeViewer from '@components/CodeViewer.astro'
|
||||
import createVue3REPL from '@utils/createVue3REPL.js'
|
||||
import createSvelteREPL from '@utils/createSvelteREPL.js'
|
||||
import createAlpineREPL from '@utils/createAlpineREPL.js'
|
||||
import Title from '@/components/Title.svelte'
|
||||
import FrameworkLabel from '@/components/FrameworkLabel.astro'
|
||||
import FRAMEWORKS from '@/frameworks.mjs'
|
||||
import CodeViewer from '@/components/CodeViewer.astro'
|
||||
import createVue3REPL from '@/utils/createVue3REPL.js'
|
||||
import createSvelteREPL from '@/utils/createSvelteREPL.js'
|
||||
import createAlpineREPL from '@/utils/createAlpineREPL.js'
|
||||
|
||||
const { path: sectionPath } = Astro.props
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import FRAMEWORKS from '@config/frameworks.mjs';
|
||||
import FRAMEWORKS from '@/frameworks.mjs';
|
||||
|
||||
frameworkDisplayModule();
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
---
|
||||
import FRAMEWORKS from '@config/frameworks.mjs';
|
||||
import BaseLayout from '@layouts/BaseLayout.svelte';
|
||||
import generateContentTree from '@utils/generateContentTree.js';
|
||||
import FrameworkLabel from '@components/FrameworkLabel.astro';
|
||||
import FRAMEWORKS from '@/frameworks.mjs';
|
||||
import BaseLayout from '@/layouts/BaseLayout.svelte';
|
||||
import generateContentTree from '@/utils/generateContentTree.js';
|
||||
import FrameworkLabel from '@/components/FrameworkLabel.astro';
|
||||
|
||||
const tree = await generateContentTree();
|
||||
---
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script>
|
||||
import FRAMEWORKS from '@config/frameworks.mjs';
|
||||
import FRAMEWORKS from '@/frameworks.mjs';
|
||||
|
||||
export let tree = [];
|
||||
</script>
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
import fs from 'node:fs/promises';
|
||||
import { packageDirectory } from 'pkg-dir';
|
||||
|
||||
import Layout from '@layouts/BaseLayout.astro';
|
||||
import Section from '@components/Section.astro';
|
||||
import Layout from '@/layouts/BaseLayout.astro';
|
||||
import Section from '@/components/Section.astro';
|
||||
|
||||
const rootDir = await packageDirectory()
|
||||
const contentURL = `${rootDir}/content`
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import fs from 'node:fs/promises';
|
||||
import crypto from 'crypto';
|
||||
|
||||
import createFsCache from '@utils/createFsCache.js';
|
||||
import createFsCache from '@/utils/createFsCache.js';
|
||||
|
||||
async function md5(data) {
|
||||
return crypto.createHash('md5').update(data).digest('hex');
|
||||
|
||||
@@ -14,10 +14,7 @@
|
||||
"module": "es2020",
|
||||
"lib": ["es2018", "dom"],
|
||||
"paths": {
|
||||
"@components/*": ["src/components/*"],
|
||||
"@utils/*": ["src/utils/*"],
|
||||
"@layouts/*": ["src/layouts/*"],
|
||||
"@config/*": ["src/*"]
|
||||
"@/*": ["src/*"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user