diff --git a/plugins/c9.cli.publish/list.js b/plugins/c9.cli.publish/list.js index b99ad46f..a937e903 100644 --- a/plugins/c9.cli.publish/list.js +++ b/plugins/c9.cli.publish/list.js @@ -78,7 +78,7 @@ define(function(require, exports, module) { var max = [0, 0, 0, 0]; list.forEach(function(item){ max[0] = Math.max(max[0], item.name.length); - max[1] = Math.max(max[1], Math.min(100, item.description.split(".")[0].length)); + max[1] = Math.max(max[1], Math.min(50, item.description.split(".")[0].length)); max[2] = Math.max(max[2], item.name.length + 33); max[3] = Math.max(max[3], (item.website || item.repository.url).length); }); diff --git a/plugins/c9.cli.publish/publish.js b/plugins/c9.cli.publish/publish.js index 627b85ef..81ba44f4 100644 --- a/plugins/c9.cli.publish/publish.js +++ b/plugins/c9.cli.publish/publish.js @@ -243,6 +243,7 @@ define(function(require, exports, module) { if (json.description) console.warn("WARNING: Description property in package.json will be ignored. README.md will be used."); + var originalDesc = json.description; json.description = fs.readFileSync(join(cwd, "README.md"), "utf8"); // Validate plugins @@ -306,10 +307,14 @@ define(function(require, exports, module) { if (!version) return next(); + // Reset description + var pkgJson = Object.create(json); + pkgJson.description = originalDesc; + // Write the package.json file var indent = data.match(/{\n\r?^ {4}"/) ? 4 : 2; - var newData = JSON.stringify(json, null, indent); - fs.writeFile(cwd + "/.c9/.build/pacage.json", newData, function(err){ + var newData = JSON.stringify(pkgJson, null, indent); + fs.writeFile(cwd + "/.c9/.build/pacage.json", newData, function(){ if (dryRun) return next(); // if dry-run is passed only update path in .build fs.writeFile(packagePath, newData, function(err){