pull/85/head
Ruben Daniels 2015-04-27 19:51:14 +00:00 zatwierdzone przez nightwing
rodzic 485f194359
commit e6f514e5fb
2 zmienionych plików z 8 dodań i 3 usunięć

Wyświetl plik

@ -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);
});

Wyświetl plik

@ -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){