Skip Typescript compilation on packaging

This commit is contained in:
venashial
2022-06-20 23:50:33 -07:00
parent 252c812125
commit f70f670ed3
31 changed files with 171 additions and 132 deletions

View File

@@ -4,7 +4,7 @@
import IconChat from 'virtual:icons/heroicons-outline/chat-alt-2'
import { onMount } from 'svelte'
let headerElement
let headerElement: HTMLElement
onMount(() => {
let lastScrollTop: number

1
docs/global.d.ts vendored
View File

@@ -2,6 +2,7 @@
declare module '$assets/images/*'
declare module '$locales/*'
declare module 'insane'
declare module '*.svg' {
export { SvelteComponentDev as default } from 'svelte/internal'

View File

@@ -16,7 +16,7 @@
$page.url.pathname.replace('/', '') || 'index'
}.md`
let api
let api = { props: [], events: [], slots: [] }
if ($page.url.pathname.includes('components')) {
if (import.meta.env.DEV) {
import(`../../src/components/${title}.svelte?raw&sveld`).then(

View File

@@ -2,7 +2,7 @@ import { ComponentParser } from 'sveld'
import * as svelte from 'svelte/compiler'
import fs from 'fs/promises'
import path from 'path'
import { preprocess } from '../../src/config/svelte.config.js'
import { preprocess } from '../../src/config/svelte.js'
export default function sveld() {
return {

View File

@@ -18,7 +18,7 @@
<a class="link" href="#issues"><IconIssues /> Issues</a>
<a class="link" href="#source"><IconCode /> Source</a>
<a class="link" href="#wiki"><IconWiki /> Wiki</a>
<a class="link" href="#issues"><IconIssues /> Discord chat</a>
<a class="link" href="#issues"><IconIssues /> Discord chat</a>
<a class="link" href="#source"><IconCode /> Source link</a>
</div>
```

View File

@@ -4,11 +4,11 @@
<script lang="ts">
import { Field, FileUpload } from 'omorphia'
let file: File
let file: File
</script>
<Field label="Upload image">
<FileUpload accept="image/*" constrained bind:file />
<FileUpload accept="image/*" constrained bind:file />
</Field>
File name: {file?.name}
@@ -20,11 +20,11 @@ File name: {file?.name}
<script lang="ts">
import { Field, FileUpload } from 'omorphia'
let files: File[] = []
let files: File[] = []
</script>
<Field label="Upload file">
<FileUpload accept="*" multiple bind:files />
<FileUpload accept="*" multiple bind:files />
</Field>
Count: {files.length}

View File

@@ -2,7 +2,7 @@
<script lang="ts">
import { Modal, Button } from 'omorphia'
import IconArrowRight from 'virtual:icons/heroicons-outline/arrow-right'
import IconCheck from 'virtual:icons/heroicons-outline/check'
import IconCheck from 'virtual:icons/heroicons-outline/check'
</script>
<Modal title="Example modal" danger let:trigger>
@@ -12,7 +12,7 @@
<Button color="primary" slot="button"><IconArrowRight /> Continue</Button>
</Modal>
<Modal let:trigger size='sm'>
<Modal let:trigger size="sm">
<Button on:click={trigger} slot="trigger">Confirm modal</Button>
Are you sure you want to delete this gallery image?

View File

@@ -3,7 +3,11 @@
import { ModalDeletion, Button } from 'omorphia'
</script>
<ModalDeletion type="account" key="venashial" let:trigger on:deletion={() => console.log('Do something...')}>
<ModalDeletion
type="account"
key="venashial"
let:trigger
on:deletion={() => console.log('Do something...')}>
<Button slot="trigger" color="danger" on:click={trigger}>Delete account</Button>
</ModalDeletion>
```

View File

@@ -9,7 +9,7 @@ To make use of the built-in icons, styles, and plugins in omorphia, you will nee
Add the following parts to your `svelte.config.js` file:
```js
import { preprocess, plugins } from 'omorphia/config/svelte.config'
import { preprocess, plugins } from 'omorphia/config/svelte.js'
/** @type {import('@sveltejs/kit').Config} */
const config = {
@@ -32,5 +32,5 @@ Create a `postcss.config.cjs` file in the root of your project.
Add the following line to that file:
```js
module.exports = require('omorphia/config/postcss.config.cjs')
module.exports = require('omorphia/config/postcss.cjs')
```

View File

@@ -23,14 +23,16 @@ The `markdown` parser is designed for bodies of markdown text and supports image
#### An image \n\
![](https://cdn.modrinth.com/data/YL57xq9U/images/d382106b9a2b943d06107c31c139c77849f1a0e8.png)'
</script>
<div class="card markdown">
{@html markdown(source)}
{@html markdown(
` | Syntax | Description |
{@html markdown(
` | Syntax | Description |
| ----------- | ----------- |
| Header | Title |
| Paragraph | Text |`)}
{@html markdown('```js\nconsole.log("test")\n```')}
| Paragraph | Text |`
)}
{@html markdown('```js\nconsole.log("test")\n```')}
</div>
````