Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'cp -r dist/lib/* ' + mapbb,
'cat ' + mapbb + 'override.css dist/lib/leaflet.css > ' + mapbb + 'leaflet.css',
'rm ' + mapbb + 'override.css',
'cp -r dist/lang ' + mapbb,
'cp -r src/layers ' + mapbb + 'proprietary',
'mv ' + mapbb + 'proprietary/LayerList.js ' + mapbb,
'cp src/handlers/Handler.Length.js ' + mapbb,
'cp dist/mapbbcode.js ' + mapbb,
'cp dist/mapbbcode-config.js ' + mapbb,
'cp dist/mapbbcode-window.html ' + mapbb,
'rm -f dist/' + archive,
'cd ' + target + '; zip -r ../' + archive + ' *',
'rm -r ' + target
];
console.log('Creating ' + archive + '...');
jake.exec(commands);
};
task("check-performance", [ ], function() {
var startTime = new Date().getTime();
var command = "node bin/eslint.js tests/performance/jshint.js";
jake.exec(command, { printStdout: false, printStderr: true}, function() {
complete();
var endTime = new Date().getTime();
var runTime = endTime - startTime;
console.log("Linting jshint took " + runTime + "ms");
});
});
rules = {};
if (typeof config.rules[key] === "number") {
rules[key] = config.rules[key] || 1;
} else {
var configValue = config.rules[key];
configValue[0] = 1;
rules[key] = configValue;
}
testRun(text, rules, key);
});
console.log(JSON.stringify(results));
} else {
console.log("Failed to load " + path.resolve(filePath) + " file");
}
jake.exec("echo perf tests complete", { printStdout: true, printStderr: true}, complete);
});
function jshint(files, callback) {
var command = [ "node", JSHINT_CLI, files].join(" ");
jake.exec(command, { printStdout: true, printStderr: true }, function() {
callback();
});
}
task("test-one", function(file) {
if (file) {
var command = "node tests/lib/rules/" + file;
jake.exec(command, { printStdout: true, printStderr: true}, complete);
}
});
task("test", [ "lint" ], function() {
var command = [
"node",
ISTANBUL_CLI,
"cover --print both",
VOWS_CLI,
"-- --spec",
TEST_FILES
].join(" ");
jake.exec(command, { printStdout: true, printStderr: true }, function() {
jake.Task["check-coverage"].invoke();
complete();
});
});