This commit is contained in:
headpatsyou 2026-01-08 19:52:22 +00:00
parent de527073dc
commit d121596c8f
2 changed files with 4 additions and 33 deletions

View file

@ -4,7 +4,6 @@
"private": true,
"scripts": {
"dev": "next dev",
"prebuild": "node scripts/setup-config.js",
"build": "next build",
"start": "next start",
"lint": "next lint"

View file

@ -1,37 +1,9 @@
#!/usr/bin/env node
/**
* Setup script: creates config.json from example if it doesn't exist.
* Runs during build phase.
* This script is no longer needed.
* Configuration is now entirely env-driven via .env variables.
*/
const fs = require('fs')
const path = require('path')
const projectRoot = path.join(__dirname, '..')
const configPath = path.join(projectRoot, 'src', 'config', 'config.json')
const examplePath = path.join(projectRoot, 'src', 'config', 'config.json.example')
// Check if config.json exists
if (fs.existsSync(configPath)) {
console.log('✓ config.json found')
process.exit(0)
}
// Check if example exists
if (!fs.existsSync(examplePath)) {
console.error('✗ config.json.example not found at', examplePath)
process.exit(1)
}
// Copy example to config.json
try {
const exampleContent = fs.readFileSync(examplePath, 'utf8')
fs.writeFileSync(configPath, exampleContent)
console.log('✓ config.json created from example')
process.exit(0)
} catch (err) {
console.error('✗ Failed to create config.json:', err.message)
process.exit(1)
}
console.log('✓ Config is now env-driven; no setup needed.')
process.exit(0)