kopia lustrzana https://github.com/c9/core
fix js file detection in c9 publish
rodzic
fe6f2c260d
commit
657fe113d2
|
@ -342,9 +342,14 @@ define(function(require, exports, module) {
|
||||||
|
|
||||||
// Validate plugins
|
// Validate plugins
|
||||||
var plugins = {};
|
var plugins = {};
|
||||||
fs.readdirSync(cwd).map(function(filename) {
|
fs.readdirSync(cwd).forEach(function(filename) {
|
||||||
if (/_test\.js$/.test(filename) || !/.js/.test(filename)) return;
|
if (/_test\.js$/.test(filename) || !/\.js$/.test(filename)) return;
|
||||||
|
try {
|
||||||
var val = fs.readFileSync(cwd + "/" + filename);
|
var val = fs.readFileSync(cwd + "/" + filename);
|
||||||
|
} catch(e) {
|
||||||
|
if (e.code == "EISDIR") return;
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
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;
|
||||||
|
|
Ładowanie…
Reference in New Issue