mirror of https://github.com/tycrek/ass
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
381 B
16 lines
381 B
/**
|
|
* Used for global data management
|
|
*/
|
|
|
|
const fs = require('fs-extra');
|
|
const { log, path } = require('./utils');
|
|
|
|
// Make sure data.json exists
|
|
if (!fs.existsSync(path('data.json'))) {
|
|
fs.writeJsonSync(path('data.json'), {}, { spaces: 4 });
|
|
log('File [data.json] created');
|
|
} else log('File [data.json] exists');
|
|
|
|
const data = require('./data.json');
|
|
module.exports = data;
|