How to use the jsonfile.writeFileSync.spaces function in jsonfile

To help you get started, we’ve selected a few jsonfile examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github scriptPilot / app-framework / webpack.config.js View on Github external
var isThere = require('is-there');
var saveJSON = require('jsonfile').writeFileSync
saveJSON.spaces = 2

var project = isThere('../../package.json') ? require('../../package.json') : require('./package.json')
var app = isThere('../../package.json') ? require('../../package.json') : require('./hello-world-app/package.json')

saveJSON('./project.temp', project)
saveJSON('./app.temp', app)

const NODE_ENV = process.env.NODE_ENV || 'development';
const webpack  = require('webpack');
const path = require('path') ;

var HtmlWebpackPlugin = require('html-webpack-plugin');
var AppCachePlugin = require('appcache-webpack-plugin');
var ExtractTextPlugin = require("extract-text-webpack-plugin")

module.exports = {