chore: cleanup unused files and update gitignore

- Remove MONETIZATION.md and README.md
- Add dist/ to gitignore

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Josh 2026-01-12 02:02:52 +02:00
parent ac04d7f346
commit 58fd9c0a55
9 changed files with 35 additions and 194 deletions

View file

@ -5,6 +5,7 @@
"type": "module",
"scripts": {
"dev": "vite",
"prebuild": "unocss \"src/**/*.tsx\" -o src/uno-generated.css",
"build": "vite build",
"watch": "vite build --watch"
},
@ -21,6 +22,7 @@
"@iconify-json/lucide": "^1.2.82",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@unocss/cli": "^66.5.12",
"@vitejs/plugin-react": "^4.4.0",
"typescript": "^5.7.0",
"vite": "^6.0.0"

View file

@ -1,7 +1,7 @@
import { createRoot } from 'react-dom/client'
import { App } from './App'
import reset from '@unocss/reset/tailwind.css?inline'
import css from 'virtual:uno.css?inline'
import css from './uno-generated.css?inline'
function mount() {
const host = document.createElement('div')

View file

@ -0,0 +1,2 @@
/* Auto-generated by UnoCSS CLI - do not edit manually */
/* Run: npm run prebuild to regenerate */

View file

@ -4,11 +4,21 @@ import UnoCSS from 'unocss/vite'
import { resolve } from 'path'
export default defineConfig(({ command }) => ({
plugins: [UnoCSS(), ...(command === 'build' ? [react()] : [])],
plugins: [
// Only use UnoCSS plugin in dev mode for HMR
...(command === 'serve' ? [UnoCSS()] : []),
...(command === 'build' ? [react()] : []),
],
base: command === 'serve' ? '/@owner-tools' : '/',
esbuild: {
jsxInject: `import React from 'react'`
},
resolve: {
alias: command === 'serve' ? {
// In dev mode, alias the generated file to virtual:uno.css
'./uno-generated.css': 'virtual:uno.css',
} : {},
},
...(command === 'serve' && {
server: {
@ -36,7 +46,7 @@ export default defineConfig(({ command }) => ({
formats: ['iife'],
fileName: () => 'owner-tools.js'
},
outDir: '../../internal/build/assets/js',
emptyOutDir: false
outDir: '../../internal/tenant/assets/js',
emptyOutDir: false,
}
}))

View file

@ -4,7 +4,7 @@ import { useState, useCallback, useRef, useEffect } from 'react'
import { getLanguageIconUrl, getLanguageDisplayName, SUPPORTED_LANGUAGES } from './icons'
import { Icons } from '../../../shared/Icons'
export function CodeBlockView({ node, updateAttributes, extension }: NodeViewProps) {
export function CodeBlockView({ node, updateAttributes }: NodeViewProps) {
const { language, title } = node.attrs
const [showLanguageMenu, setShowLanguageMenu] = useState(false)
const [copied, setCopied] = useState(false)
@ -161,7 +161,9 @@ export function CodeBlockView({ node, updateAttributes, extension }: NodeViewPro
{/* Code content */}
<pre className="!mt-0 !rounded-t-none">
<NodeViewContent as="code" className={language ? `language-${language}` : ''} />
<code className={language ? `language-${language}` : ''}>
<NodeViewContent />
</code>
</pre>
</NodeViewWrapper>
)