Files
chat-ui/apps/web/scripts/add-css-source.js
T
Thuc Pham 3481173bbc docs: update document for chat-ui (#102)
---------
Co-authored-by: Marcus Schiesser <mail@marcusschiesser.de>
2025-05-30 13:40:24 +07:00

23 lines
643 B
JavaScript

const fs = require('fs')
const path = require('path')
const registryPath = path.join(__dirname, '../public/r/chat.json')
try {
// Read the built registry file
const registryData = JSON.parse(fs.readFileSync(registryPath, 'utf8'))
// Add the CSS source directive
registryData.css = {
"@source '../node_modules/@llamaindex/chat-ui/**/*.{ts,tsx}'": '',
}
// Write back the modified registry
fs.writeFileSync(registryPath, JSON.stringify(registryData, null, 2))
console.log('✅ CSS source directive added to registry')
} catch (error) {
console.error('❌ Error modifying registry:', error.message)
process.exit(1)
}