.then(function () { if (package_json) { return fs .readJSON(package_path) .then(function (origin_json) { return fs.writeFile(package_path, Object.assign({}, origin_json, package_json), { space: ' ' }); }) } })
.then(function (file_stat) { if (file_stat) { return fs.readJSON(file_stat.abs_path) } throw new Error('package does"t exist.') })