kopia lustrzana https://github.com/c9/core
Merge branch 'sdk-pkg' of github.com:c9/newclient into sdk-pkg
commit
b1535ae53c
|
@ -552,10 +552,18 @@ define(function(require, exports, module) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (json.installer) {
|
if (json.installer) {
|
||||||
|
var path = join(cwd, json.installer);
|
||||||
|
var installerCode = fs.readFileSync(path, "utf8");
|
||||||
|
|
||||||
|
var m = installerCode.match(/\.version\s*=\s*(\d+)/g);
|
||||||
|
|
||||||
|
var installerVersion = m && m[0];
|
||||||
|
if (!installerVersion)
|
||||||
|
return callback(new Error("ERROR: missing installer version in " + json.installer));
|
||||||
extraCode.push({
|
extraCode.push({
|
||||||
type: "installer",
|
type: "installer",
|
||||||
filename: json.installer.main,
|
filename: json.installer,
|
||||||
data: json.installer.version
|
data: version
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -573,10 +581,15 @@ define(function(require, exports, module) {
|
||||||
var debug = imports["plugin.debug"];
|
var debug = imports["plugin.debug"];
|
||||||
var Plugin = imports.Plugin;
|
var Plugin = imports.Plugin;
|
||||||
var plugin = new Plugin();
|
var plugin = new Plugin();
|
||||||
extraCode.forEach(function(x) {
|
plugin.version = "VERSION";
|
||||||
debug.addStaticPlugin(x.type, "packageName", x.filename, x.data, plugin);
|
plugin.on("load", function load() {
|
||||||
|
extraCode.forEach(function(x) {
|
||||||
|
debug.addStaticPlugin(x.type, "packageName", x.filename, x.data, plugin);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
plugin.load("Cloud9 Bundle");
|
||||||
|
|
||||||
register(null, {});
|
register(null, {});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -588,6 +601,7 @@ define(function(require, exports, module) {
|
||||||
.replace(new RegExp("^ {" + indent + "}", "gm"), "")
|
.replace(new RegExp("^ {" + indent + "}", "gm"), "")
|
||||||
.replace(/^.*?{|}$/g, "")
|
.replace(/^.*?{|}$/g, "")
|
||||||
.replace(/packageName/g, packageName)
|
.replace(/packageName/g, packageName)
|
||||||
|
.replace(/VERSION/g, json.version)
|
||||||
.replace(/^(\s*)extraCode/gm, function(_, indent) {
|
.replace(/^(\s*)extraCode/gm, function(_, indent) {
|
||||||
return JSON.stringify(extraCode, null, 4)
|
return JSON.stringify(extraCode, null, 4)
|
||||||
.replace(/^/gm, indent);
|
.replace(/^/gm, indent);
|
||||||
|
|
|
@ -91,7 +91,7 @@ define(function(require, exports, module) {
|
||||||
require([root + "/__installed__"], function(plugins) {
|
require([root + "/__installed__"], function(plugins) {
|
||||||
var config = plugins.map(function(p) {
|
var config = plugins.map(function(p) {
|
||||||
return {
|
return {
|
||||||
staticPrefix: host + join(base, name),
|
staticPrefix: host + join(base, paths[root]),
|
||||||
packagePath: p
|
packagePath: p
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
Ładowanie…
Reference in New Issue