issues
This commit is contained in:
parent
de527073dc
commit
d121596c8f
2 changed files with 4 additions and 33 deletions
|
|
@ -4,7 +4,6 @@
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
"prebuild": "node scripts/setup-config.js",
|
|
||||||
"build": "next build",
|
"build": "next build",
|
||||||
"start": "next start",
|
"start": "next start",
|
||||||
"lint": "next lint"
|
"lint": "next lint"
|
||||||
|
|
|
||||||
|
|
@ -1,37 +1,9 @@
|
||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Setup script: creates config.json from example if it doesn't exist.
|
* This script is no longer needed.
|
||||||
* Runs during build phase.
|
* Configuration is now entirely env-driven via .env variables.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const fs = require('fs')
|
console.log('✓ Config is now env-driven; no setup needed.')
|
||||||
const path = require('path')
|
process.exit(0)
|
||||||
|
|
||||||
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)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue