Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
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.

output-json-sync.js 375B

123456789101112131415161718
  1. 'use strict'
  2. const fs = require('graceful-fs')
  3. const path = require('path')
  4. const mkdir = require('../mkdirs')
  5. const jsonFile = require('./jsonfile')
  6. function outputJsonSync (file, data, options) {
  7. const dir = path.dirname(file)
  8. if (!fs.existsSync(dir)) {
  9. mkdir.mkdirsSync(dir)
  10. }
  11. jsonFile.writeJsonSync(file, data, options)
  12. }
  13. module.exports = outputJsonSync