You've already forked AstralRinth
forked from didirus/AstralRinth
Update docs examples + Add Select component + Add Card, Base, Title classes
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
import {mdsvex} from 'mdsvex';
|
||||
import mdsvexConfig from './mdsvex.config.js';
|
||||
import adapter from '@sveltejs/adapter-auto';
|
||||
import adapter from '@sveltejs/adapter-static';
|
||||
import preprocess from 'svelte-preprocess';
|
||||
import sveltePreprocess from 'svelte-preprocess';
|
||||
import Icons from 'unplugin-icons/vite';
|
||||
import svelteSvg from '@poppanator/sveltekit-svg';
|
||||
import {parse} from 'sveltedoc-parser'
|
||||
import * as svelte from 'svelte/compiler'
|
||||
import examples from 'mdsvexamples/vite'
|
||||
import sveld from './plugins/sveld.js'
|
||||
import path from "path";
|
||||
|
||||
/** @type {import('@sveltejs/kit').Config} */
|
||||
const config = {
|
||||
@@ -28,35 +29,45 @@ const config = {
|
||||
compiler: 'svelte',
|
||||
defaultClass: 'icon',
|
||||
}),
|
||||
{
|
||||
name: "sveltedoc-parser",
|
||||
async transform(src, id) {
|
||||
const query = id.split('?')[1]
|
||||
|
||||
if ((query || '').includes('raw&api')) {
|
||||
const raw = JSON.parse(src.split('export default ')[1])
|
||||
|
||||
let {code} = await svelte.preprocess(raw, sveltePreprocess(), {
|
||||
filename: id
|
||||
})
|
||||
|
||||
const data = await parse({
|
||||
fileContent: code,
|
||||
encoding: 'ascii',
|
||||
features: ['data', 'computed', 'events', 'slots'],
|
||||
ignoredVisibilities: ['private'],
|
||||
includeSourceLocations: true,
|
||||
version: 3
|
||||
})
|
||||
|
||||
return {
|
||||
code: `export default ${JSON.stringify(data)}`,
|
||||
map: null
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
examples,
|
||||
sveld(),
|
||||
// {
|
||||
// name: "sveltedoc-parser",
|
||||
// async transform(src, id) {
|
||||
// const query = id.split('?')[1]
|
||||
//
|
||||
// if ((query || '').includes('raw&api')) {
|
||||
// const raw = JSON.parse(src.split('export default ')[1])
|
||||
//
|
||||
// let {code} = await svelte.preprocess(raw, sveltePreprocess(), {
|
||||
// filename: id
|
||||
// })
|
||||
//
|
||||
// const data = await parse({
|
||||
// fileContent: code,
|
||||
// encoding: 'ascii',
|
||||
// features: ['data', 'computed', 'events', 'slots'],
|
||||
// ignoredVisibilities: ['private'],
|
||||
// includeSourceLocations: true,
|
||||
// version: 3
|
||||
// })
|
||||
//
|
||||
// return {
|
||||
// code: `export default ${JSON.stringify(data)}`,
|
||||
// map: null
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
],
|
||||
|
||||
resolve: {
|
||||
alias: {
|
||||
$lib: path.resolve('./src/lib'),
|
||||
$routes: path.resolve('./src/routes'),
|
||||
omorphia: path.resolve('./src/lib'),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user