Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function compileServer(cb)
{
process.chdir(__dirname);
return gulp.src(['server/**/*.ts','typings/node.d.ts'])
.pipe(sourcemaps.init())
.pipe(sourcemaps.identityMap())
.pipe(typescript({
out: "app.js",
module: "system",
target: "es2017",
experimentalDecorators: true,
sourceMap: true,
}))
.pipe(sourcemaps.write(".", { includeContent: false, addComment: true }))
.pipe(gulp.dest("."))
.on('error', swallowError)
.on('finish', function ()
{
util.log(util.colors.cyan("Server compilation complete"));
});
}
function compileRuntime(cb)
{
process.chdir(__dirname + "/public");
return gulp.src(['./Engine/Logic/**/*.ts', './Engine/Module/MapEditor/MapEditorData.ts', './Engine/Module/ZoneEditor/ZoneEditorData.ts', './Engine/GUI/**/*.ts', './Engine/Libs/**/*.ts', './Engine/*.ts', './Engine/Module/Play/*.ts', './Engine/Module/GameList/*.ts', './Engine/Module/Logout/*.ts'])
.pipe(sourcemaps.init({ largeFile: true }))
.pipe(sourcemaps.identityMap())
.pipe(typescript({
outFile: "runtime.js",
module: "system",
target: "es5",
experimentalDecorators: true
}))
.pipe(sourcemaps.write(".", { includeContent: false, addComment: true }))
.pipe(gulp.dest("."))
.on('error', swallowError)
.on('finish', function ()
{
util.log(util.colors.cyan("Runtime compilation complete"));
//gulp.start('compile:runtime:mini');
});
}
function compileMaker(cb)
{
process.chdir(__dirname + "/public");
return gulp.src(['./Engine/**/*.ts'])
.pipe(sourcemaps.init())
.pipe(sourcemaps.identityMap())
.pipe(typescript({
out: "maker.js",
module: "system",
target: "es5",
experimentalDecorators: true,
sourceMap: true,
}))
.pipe(sourcemaps.write(".", {
includeContent: false, addComment: true
}))
.pipe(gulp.dest("."))
.on('error', swallowError)
.on('finish', function ()
{
util.log(util.colors.cyan("Maker compilation complete"));
//gulp.start('compile:maker:mini');