import * as fs from 'fs' ; const stringify = require ( 'json-stable-stringify' ) ; const fName = './dist/package.json' ; const data = require ( fName ) ; delete data . devDependencies ; delete data . engines ; data . private = false ; fs . writeFileSync ( fName , stringify ( data , { space : 2 } ) ) ;