kopia lustrzana https://github.com/c9/core
commit
93cf937fd1
|
@ -66,7 +66,7 @@
|
||||||
"c9.ide.language.javascript.tern": "#9bf164ec27",
|
"c9.ide.language.javascript.tern": "#9bf164ec27",
|
||||||
"c9.ide.language.javascript.infer": "#8478e3c702",
|
"c9.ide.language.javascript.infer": "#8478e3c702",
|
||||||
"c9.ide.language.jsonalyzer": "#e0d94eda4f",
|
"c9.ide.language.jsonalyzer": "#e0d94eda4f",
|
||||||
"c9.ide.collab": "#c74666f592",
|
"c9.ide.collab": "#fd08d9a123",
|
||||||
"c9.ide.local": "#a9703b630c",
|
"c9.ide.local": "#a9703b630c",
|
||||||
"c9.ide.find": "#e073bf251a",
|
"c9.ide.find": "#e073bf251a",
|
||||||
"c9.ide.find.infiles": "#c132ad243c",
|
"c9.ide.find.infiles": "#c132ad243c",
|
||||||
|
|
|
@ -282,6 +282,17 @@ define(function(require, exports, module) {
|
||||||
|
|
||||||
// Validate plugins
|
// Validate plugins
|
||||||
var plugins = {};
|
var plugins = {};
|
||||||
|
|
||||||
|
var warned, failed;
|
||||||
|
Object.keys(json.plugins || {}).forEach(function(name){
|
||||||
|
var filename = name + ".js";
|
||||||
|
if (!fs.existsSync(join(cwd, name + "_test.js"))) {
|
||||||
|
console.warn("ERROR: Plugin '" + name + "' has no test associated with it. There must be a file called '" + name + "_test.js' containing tests.");
|
||||||
|
warned = true;
|
||||||
|
}
|
||||||
|
plugins[filename] = json.plugins[name];
|
||||||
|
});
|
||||||
|
|
||||||
fs.readdirSync(cwd).forEach(function(filename) {
|
fs.readdirSync(cwd).forEach(function(filename) {
|
||||||
if (/(__\w*__|_test)\.js$/.test(filename) || !/\.js$/.test(filename)) return;
|
if (/(__\w*__|_test)\.js$/.test(filename) || !/\.js$/.test(filename)) return;
|
||||||
try {
|
try {
|
||||||
|
@ -293,18 +304,8 @@ define(function(require, exports, module) {
|
||||||
if (!/\(options,\s*imports,\s*register\)/.test(val)) return;
|
if (!/\(options,\s*imports,\s*register\)/.test(val)) return;
|
||||||
if (!/consumes\s*=/.test(val)) return;
|
if (!/consumes\s*=/.test(val)) return;
|
||||||
if (!/provides\s*=/.test(val)) return;
|
if (!/provides\s*=/.test(val)) return;
|
||||||
plugins[filename] = {};
|
if (!plugins[filename]) {
|
||||||
});
|
console.warn("WARNING: Plugin '" + filename + "' is not listed in package.json.");
|
||||||
|
|
||||||
var warned, failed;
|
|
||||||
Object.keys(plugins).forEach(function(name){
|
|
||||||
if (!json.plugins[name.replace(/\.js$/, "")]) {
|
|
||||||
console.warn("WARNING: Plugin '" + name + "' is not listed in package.json.");
|
|
||||||
warned = true;
|
|
||||||
}
|
|
||||||
else if (!fs.existsSync(join(cwd, name.replace(/\.js$/, "_test.js")))) {
|
|
||||||
console.warn("ERROR: Plugin '" + name + "' has no test associated with it. There must be a file called '" + name.replace(/\.js$/, "") + "_test.js' containing tests.");
|
|
||||||
warned = true;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue