Sha256: f8388235c1188eb35cdb7790829009207931f983933fedd7812ae2138f9124e3

Contents?: true

Size: 375 Bytes

Versions: 48

Compression:

Stored size: 375 Bytes

Contents

'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

Version data entries

48 entries across 48 versions & 3 rubygems

Version Path
govuk_publishing_components-17.10.0 node_modules/fs-extra/lib/json/output-json-sync.js
govuk_publishing_components-17.9.0 node_modules/fs-extra/lib/json/output-json-sync.js
govuk_publishing_components-17.8.0 node_modules/fs-extra/lib/json/output-json-sync.js
govuk_publishing_components-17.7.0 node_modules/fs-extra/lib/json/output-json-sync.js
govuk_publishing_components-17.6.1 node_modules/fs-extra/lib/json/output-json-sync.js
govuk_publishing_components-17.6.0 node_modules/fs-extra/lib/json/output-json-sync.js
govuk_publishing_components-17.5.0 node_modules/fs-extra/lib/json/output-json-sync.js
govuk_publishing_components-17.4.0 node_modules/fs-extra/lib/json/output-json-sync.js
govuk_publishing_components-17.3.0 node_modules/fs-extra/lib/json/output-json-sync.js
govuk_publishing_components-17.2.0 node_modules/fs-extra/lib/json/output-json-sync.js
govuk_publishing_components-17.1.1 node_modules/fs-extra/lib/json/output-json-sync.js
govuk_publishing_components-17.1.0 node_modules/fs-extra/lib/json/output-json-sync.js
govuk_publishing_components-17.0.0 node_modules/fs-extra/lib/json/output-json-sync.js
govuk_publishing_components-16.29.0 node_modules/fs-extra/lib/json/output-json-sync.js
govuk_publishing_components-16.28.0 node_modules/fs-extra/lib/json/output-json-sync.js
govuk_publishing_components-16.27.1 node_modules/fs-extra/lib/json/output-json-sync.js
govuk_publishing_components-16.27.0 node_modules/fs-extra/lib/json/output-json-sync.js
govuk_publishing_components-16.26.0 node_modules/fs-extra/lib/json/output-json-sync.js
govuk_publishing_components-16.25.0 node_modules/fs-extra/lib/json/output-json-sync.js
govuk_publishing_components-16.24.0 node_modules/fs-extra/lib/json/output-json-sync.js