From e12789ecbbb8694be30cf472406cf1ad7be7b217 Mon Sep 17 00:00:00 2001 From: nightwing Date: Tue, 4 Apr 2017 17:45:43 +0400 Subject: [PATCH] use c9build instead of .build --- plugins/c9.cli.publish/publish.js | 14 +++++++------- plugins/c9.ide.plugins/manager.js | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/c9.cli.publish/publish.js b/plugins/c9.cli.publish/publish.js index 5043c490..fa628e94 100644 --- a/plugins/c9.cli.publish/publish.js +++ b/plugins/c9.cli.publish/publish.js @@ -196,9 +196,9 @@ define(function(require, exports, module) { // Write the package.json file var indent = data.match(/{\n\r?^ {4}"/) ? 4 : 2; var newData = JSON.stringify(json, null, indent); - fs.writeFile(cwd + "/.build/package.json", newData, function() { + fs.writeFile(cwd + "/c9build/package.json", newData, function() { if (dryRun) - return next(); // if dry-run is passed only update path in .build + return next(); // if dry-run is passed only update path in c9build fs.writeFile(packagePath, newData, function(err) { if (err) return callback(err); return next(); @@ -448,17 +448,17 @@ define(function(require, exports, module) { }, function(next) { proc.execFile("rm", { - args: ["-rf", ".c9/.build"], + args: ["-rf", "c9build"], cwd: cwd }, function() { - mkdirP(cwd + "/.build"); - fs.writeFile(cwd + "/.build/package." + packageName + ".js", result.code, "utf8", next); + mkdirP(cwd + "/c9build"); + fs.writeFile(cwd + "/c9build/package." + packageName + ".js", result.code, "utf8", next); }); }, function(next) { var copy = require("architect-build/copy"); - var excludeRe = /^\.(\w*ignore|git|c9|hg|build)$/; + var excludeRe = /^\.(\w*ignore|git|c9|hg|build)$|^(c9)?build$/; var excludeMap = Object.create(null); packedFiles.push(cwd + "/package." + packageName + ".js"); @@ -470,7 +470,7 @@ define(function(require, exports, module) { if (json.installer) excludeMap["/" + normalizePath(Path.relative(cwd, json.installer))] = 0; - copy(cwd, cwd + "/.build", { + copy(cwd, cwd + "/c9build", { exclude: function(name, parent) { if (excludeRe.test(name)) return true; diff --git a/plugins/c9.ide.plugins/manager.js b/plugins/c9.ide.plugins/manager.js index 6897162f..e96def6a 100644 --- a/plugins/c9.ide.plugins/manager.js +++ b/plugins/c9.ide.plugins/manager.js @@ -729,7 +729,7 @@ define(function(require, exports, module) { if (!options.name || options.name == "json") options.name = parts[parts.length - 1]; // try parent folder name - if (/^(.?build|master)/.test(options.name)) + if (/^(.?build|master|c9build)/.test(options.name)) options.name = parts[parts.length - 2]; // remove version from the name options.name = options.name.replace(/@.*$/, "");