mirror of
https://github.com/fmhy/edit.git
synced 2025-07-31 08:12:23 +10:00
feat: build env options, formatting, selfhosting guide
This commit is contained in:
parent
88a1a989d9
commit
929bd44275
39 changed files with 268 additions and 764 deletions
|
@ -1,5 +1,7 @@
|
|||
import { meta } from '../constants'
|
||||
|
||||
/**
|
||||
* Copyright (c) taskylizard. All rights reserved.
|
||||
* Copyright (c) 2025 taskylizard. Apache License 2.0.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -146,7 +148,7 @@ export function getHeader(id: string) {
|
|||
|
||||
const description = '<p class="text-black dark:text-text-2">'
|
||||
|
||||
const feedback = '<Feedback />'
|
||||
const feedback = meta.build.api ? '<Feedback />' : ''
|
||||
|
||||
const data = headers[id]
|
||||
let header = '---\n'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) taskylizard. All rights reserved.
|
||||
* Copyright (c) 2025 taskylizard. Apache License 2.0.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -30,8 +30,8 @@ interface Replacer {
|
|||
}
|
||||
|
||||
export const transformer = (text: string) => {
|
||||
const handler: ProxyHandler = {
|
||||
get(target, prop) {
|
||||
const handler: ProxyHandler<{ text: string }> = {
|
||||
get(target: { text: string }, prop: string | symbol) {
|
||||
if (prop === 'transform') {
|
||||
return (name: string, transforms: Transform[]): Replacer => {
|
||||
consola.debug(`Starting transform ${name} with ${transforms}`)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue