mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-20 18:25:21 -04:00
refactor: reorganize files in commons package
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
c9b98f6185
commit
4d9792bcb9
23 changed files with 94 additions and 69 deletions
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
import { NoteFrontmatter } from '../note-frontmatter/frontmatter.js'
|
||||
import { NoteFrontmatter } from '../note-frontmatter/index.js'
|
||||
import { parseTags } from './parse-tags.js'
|
||||
import { RawNoteFrontmatter } from './types.js'
|
||||
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file)
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
import {
|
||||
NoteFrontmatter,
|
||||
NoteTextDirection,
|
||||
NoteType
|
||||
} from '../note-frontmatter/frontmatter.js'
|
||||
import { SlideOptions } from '../note-frontmatter/slide-show-options.js'
|
||||
|
||||
export const defaultSlideOptions: SlideOptions = {
|
||||
transition: 'zoom',
|
||||
autoSlide: 0,
|
||||
autoSlideStoppable: true,
|
||||
backgroundTransition: 'fade',
|
||||
slideNumber: false
|
||||
}
|
||||
|
||||
export const defaultNoteFrontmatter: NoteFrontmatter = {
|
||||
title: '',
|
||||
description: '',
|
||||
tags: [],
|
||||
robots: '',
|
||||
lang: 'en',
|
||||
dir: NoteTextDirection.LTR,
|
||||
newlinesAreBreaks: true,
|
||||
license: '',
|
||||
type: NoteType.DOCUMENT,
|
||||
opengraph: {},
|
||||
slideOptions: defaultSlideOptions
|
||||
}
|
10
commons/src/note-frontmatter-parser/index.ts
Normal file
10
commons/src/note-frontmatter-parser/index.ts
Normal file
|
@ -0,0 +1,10 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file)
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
export * from './parse-raw-frontmatter-from-yaml.js'
|
||||
export * from './convert-raw-frontmatter-to-note-frontmatter.js'
|
||||
export * from './parse-tags.js'
|
||||
export * from './types.js'
|
|
@ -3,14 +3,14 @@
|
|||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
import { defaultNoteFrontmatter } from '../note-frontmatter/index.js'
|
||||
import {
|
||||
NoteTextDirection,
|
||||
NoteType,
|
||||
OpenGraph
|
||||
} from '../note-frontmatter/frontmatter.js'
|
||||
} from '../note-frontmatter/index.js'
|
||||
import { SlideOptions } from '../note-frontmatter/index.js'
|
||||
import { ISO6391 } from '../note-frontmatter/iso6391.js'
|
||||
import { SlideOptions } from '../note-frontmatter/slide-show-options.js'
|
||||
import { defaultNoteFrontmatter } from './default-values.js'
|
||||
import type { RawNoteFrontmatter } from './types.js'
|
||||
import type { ValidationError } from 'joi'
|
||||
import Joi from 'joi'
|
||||
|
|
|
@ -8,8 +8,8 @@ import {
|
|||
NoteTextDirection,
|
||||
NoteType,
|
||||
OpenGraph
|
||||
} from '../note-frontmatter/frontmatter.js'
|
||||
import { SlideOptions } from '../note-frontmatter/slide-show-options.js'
|
||||
} from '../note-frontmatter/index.js'
|
||||
import { SlideOptions } from '../note-frontmatter/index.js'
|
||||
|
||||
export interface RawNoteFrontmatter {
|
||||
title: string
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue