rename composable files to composable notation
This commit is contained in:
parent
d851db2fcc
commit
0a3c9f71d8
18 changed files with 217 additions and 202 deletions
13
src/composables/useSaveToJSON.ts
Normal file
13
src/composables/useSaveToJSON.ts
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
|
||||
import {config} from "@/config";
|
||||
import fs from 'fs';
|
||||
|
||||
export const saveToJson = (fileName: string, data: any) => {
|
||||
|
||||
fs.writeFile(config.configPath + fileName, JSON.stringify(data), (err) => {
|
||||
if (err) {
|
||||
console.log("Error when saving to json.")
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
Loading…
Reference in a new issue