Esempio n. 1
0
 .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: '  '
         });
       })
   }
 })
Esempio n. 2
0
 .then(function (file_stat) {
   if (file_stat) {
     return fs.readJSON(file_stat.abs_path)
   }
   throw new Error('package does"t exist.')
 })