代码拉取完成,页面将自动刷新
同步操作将从 Nomat/lcc-gba 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
let gulp = require("gulp");
let ts = require("gulp-typescript");
let sourcemaps = require('gulp-sourcemaps');
let rename = require("gulp-rename");
let uglify = require("gulp-uglify");
let concat = require('gulp-concat');
let clean = require('gulp-clean');
let jsobfuscator = require('gulp-javascript-obfuscator');
let debug = require('gulp-debug');
let notify = require('gulp-notify');
let merge = require('merge2');
let through = require('through2');
let fs=require("fs");
let path=require("path");
let argv = require('yargs').argv;
/**
* 框架ts配置
*/
const framworkTS = ts.createProject({
module : "system",
lib : [ "dom", "es5", "es2015.promise" ],
target : "es5",
experimentalDecorators : true,
skipLibCheck : true,
noImplicitAny : false,
declaration : true,
removeComments : true,
outFile : "lcc-gba.js",
});
/**
* 构建框架
*/
export function buildFramework(cb:Function) {
if(fs.existsSync('framework')){
console.log("buildFramework");
let tsResult = gulp.src([ 'framework/**/*.ts' ])
.pipe(sourcemaps.init())
.pipe(framworkTS());
return merge(
tsResult.js
/*
.pipe(jsobfuscator({
compact: true
}))
.pipe(uglify())
*/
.pipe(sourcemaps.write())
.pipe(gulp.dest('assets/scripts')),
tsResult.dts
/*
.pipe(rename((path)=>{
path.basename = "lcc-" + path.basename;
}))
*/
.pipe(gulp.dest('./'))
);
}else{
console.error("framework sources not found!");
cb();
}
}
/**
* 测试
* @param cb
*/
export function test(cb:Function){
return gulp.src([ '../../@types/**/*.ts', '../../assets/**/*.ts', '!../../assets/packs/**/*.ts' ])
.pipe(debug({title: 'file:'}));
}
/**
* 默认构建
*/
export default function build(cb:Function){
console.log("please select a task:");
console.log(" buildFramework");
cb();
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。