1
0
Fork 0
management/front/dkha-web-sz-main/node_modules/fs-extra/lib/json/output-json-sync.js

19 lines
375 B
JavaScript
Raw Normal View History

2023-12-18 13:12:25 +08:00
'use strict'
const fs = require('graceful-fs')
const path = require('path')
const mkdir = require('../mkdirs')
const jsonFile = require('./jsonfile')
function outputJsonSync (file, data, options) {
const dir = path.dirname(file)
if (!fs.existsSync(dir)) {
mkdir.mkdirsSync(dir)
}
jsonFile.writeJsonSync(file, data, options)
}
module.exports = outputJsonSync