Füge ESM-Importe und Skriptbeschreibung für das Aufteilen von Namen in Benutzer- und Bewerbungsdateien hinzu
Some checks failed
Code Analysis (JS/Vue) / analyze (push) Failing after 46s
Some checks failed
Code Analysis (JS/Vue) / analyze (push) Failing after 46s
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
#!/usr/bin/env node
|
||||
// Script to split name field in membership application JSON files under server/data/membership-applications/
|
||||
// Script to split name field in membership application JSON files under server/data/membership-applications/ (ESM)
|
||||
// It will create backups for each modified file.
|
||||
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
import fs from 'fs'
|
||||
import path from 'path'
|
||||
import { fileURLToPath } from 'url'
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url)
|
||||
const __dirname = path.dirname(__filename)
|
||||
|
||||
const APPS_DIR = path.join(__dirname, '../server/data/membership-applications')
|
||||
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
#!/usr/bin/env node
|
||||
// Script: split-names-in-users.js
|
||||
// Script: split-names-in-users.js (ESM)
|
||||
// Splittet das Feld "name" in firstName und lastName für alle User in users.json, falls noch nicht vorhanden.
|
||||
// Backup wird automatisch angelegt.
|
||||
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
import fs from 'fs'
|
||||
import path from 'path'
|
||||
import { fileURLToPath } from 'url'
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url)
|
||||
const __dirname = path.dirname(__filename)
|
||||
|
||||
const usersPath = path.join(__dirname, '../server/data/users.json')
|
||||
const backupPath = usersPath + '.bak.' + new Date().toISOString().replace(/[:.]/g, '-')
|
||||
|
||||
Reference in New Issue
Block a user