调整fc模拟器路径,修改混淆方式
This commit is contained in:
parent
70d8b3329e
commit
a45d950e76
@ -22,6 +22,9 @@
|
||||
var hideInviteMask = function (){
|
||||
document.getElementById('info-mask').style.display = 'none';
|
||||
}
|
||||
wx.miniProgram.getEnv(function(res) {
|
||||
console.log(res) // true
|
||||
})
|
||||
</script>
|
||||
</head>
|
||||
|
||||
|
@ -22,7 +22,7 @@ function getParameter (t) {
|
||||
return e.match(i) ? e.match(i)[0].substr(t.length + 1) : null
|
||||
}
|
||||
var netmode = getParameter("roomId")?true:false;
|
||||
var worker = new Worker('./js/jsnes.min.js');
|
||||
var worker = new Worker('./lib/jsnes.min.js');
|
||||
worker.postMessage({
|
||||
f:"netmode",
|
||||
data:netmode
|
||||
|
242
fc/js/jsnes.min.js → fc/lib/jsnes.min.js
vendored
242
fc/js/jsnes.min.js → fc/lib/jsnes.min.js
vendored
File diff suppressed because one or more lines are too long
122
fc/resources/jsnes.min.js
vendored
Normal file
122
fc/resources/jsnes.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
74
gulpfile.js
74
gulpfile.js
@ -7,54 +7,58 @@ var gulp = require('gulp'),
|
||||
stripDebug = require("gulp-strip-debug"),//移除console语句
|
||||
cleanCSS = require('gulp-clean-css'),
|
||||
gutil = require('gulp-util');
|
||||
const javascriptObfuscator = require('gulp-javascript-obfuscator');
|
||||
|
||||
//检查js的语法错误
|
||||
gulp.task('jslint', function () {
|
||||
return gulp.src('fc/js/*.js')
|
||||
.pipe(jshint())
|
||||
.pipe(jshint.reporter('default'))
|
||||
.pipe(notify({message: 'finished jslint'}));
|
||||
});
|
||||
//发布所有html
|
||||
gulp.task('disthtml', function(){
|
||||
return gulp.src(['**/*.html', '!node_modules/**/*', '!dist/**/*'])
|
||||
.pipe(gulp.dest('dist'));
|
||||
})
|
||||
//处理fc的css
|
||||
gulp.task('distfccss', function() {
|
||||
return gulp.src(['fc/css/**/*.css'])
|
||||
.pipe(cleanCSS())
|
||||
.pipe(gulp.dest('dist/fc/css'));
|
||||
})
|
||||
//处理fc的图片资源
|
||||
gulp.task('distfcstatic', function() {
|
||||
return gulp.src(['fc/resources/**/*'])
|
||||
.pipe(gulp.dest('dist/fc/resources'));
|
||||
})
|
||||
gulp.task('distfclib', function() {
|
||||
return gulp.src(['fc/lib/**/*'])
|
||||
.pipe(gulp.dest('dist/fc/lib'));
|
||||
})
|
||||
gulp.task('distfcjs', function() {
|
||||
return gulp.src(['fc/js/*.js'])
|
||||
// .pipe(concat('main.js'))
|
||||
// .pipe(rename({suffix: '.min'}))
|
||||
//https://github.com/mishoo/UglifyJS2
|
||||
.pipe(uglify({
|
||||
mangle:true,
|
||||
compress:true,
|
||||
output: {
|
||||
comments: false //保留注释, all: 保留所有,some:只保留license等信息,false: 不保留,正则或者function
|
||||
}
|
||||
.pipe(javascriptObfuscator({
|
||||
compact:true,
|
||||
sourceMap: false,
|
||||
debugProtection: true,
|
||||
domainLock: ['kingsome.cn', '.zhl.com']
|
||||
}))
|
||||
.pipe(stripDebug())
|
||||
.pipe(gulp.dest('dist/fc/js'));
|
||||
});
|
||||
gulp.task('distfc', ['distfcjs', 'distfccss', 'distfcstatic'])
|
||||
gulp.task('distfc', ['distfcjs', 'distfccss', 'distfcstatic', 'distfclib'])
|
||||
|
||||
gulp.task('distgbajs', function() {
|
||||
return gulp.src(['gba/dist/*.js'])
|
||||
// .pipe(concat('main.js'))
|
||||
// .pipe(rename({suffix: '.min'}))
|
||||
//https://github.com/mishoo/UglifyJS2
|
||||
.pipe(uglify({
|
||||
mangle:true,
|
||||
compress:true,
|
||||
output: {
|
||||
comments: false //保留注释, all: 保留所有,some:只保留license等信息,false: 不保留,正则或者function
|
||||
}
|
||||
.pipe(javascriptObfuscator({
|
||||
compact:true,
|
||||
sourceMap: false,
|
||||
debugProtection: true,
|
||||
domainLock: ['kingsome.cn', '.zhl.com']
|
||||
}))
|
||||
.pipe(stripDebug())
|
||||
.pipe(gulp.dest('dist/gba/dist'));
|
||||
@ -78,12 +82,11 @@ var gulp = require('gulp'),
|
||||
// .pipe(concat('main.js'))
|
||||
// .pipe(rename({suffix: '.min'}))
|
||||
//https://github.com/mishoo/UglifyJS2
|
||||
.pipe(uglify({
|
||||
mangle:true,
|
||||
compress:true,
|
||||
output: {
|
||||
comments: false //保留注释, all: 保留所有,some:只保留license等信息,false: 不保留,正则或者function
|
||||
}
|
||||
.pipe(javascriptObfuscator({
|
||||
compact:true,
|
||||
sourceMap: false,
|
||||
debugProtection: true,
|
||||
domainLock: ['kingsome.cn', '.zhl.com']
|
||||
}))
|
||||
.pipe(stripDebug())
|
||||
.pipe(gulp.dest('dist/gba2/dist'));
|
||||
@ -103,24 +106,22 @@ var gulp = require('gulp'),
|
||||
})
|
||||
gulp.task('distgba2jscore', function() {
|
||||
return gulp.src(['gba2/IodineGBA/**/*'])
|
||||
.pipe(uglify({
|
||||
mangle:true,
|
||||
compress:true,
|
||||
output: {
|
||||
comments: false //保留注释, all: 保留所有,some:只保留license等信息,false: 不保留,正则或者function
|
||||
}
|
||||
}))
|
||||
.pipe(javascriptObfuscator({
|
||||
compact:true,
|
||||
sourceMap: false,
|
||||
debugProtection: true,
|
||||
domainLock: ['kingsome.cn', '.zhl.com']
|
||||
}))
|
||||
.pipe(gulp.dest('dist/gba2/IodineGBA'));
|
||||
})
|
||||
gulp.task('distgba2jsuser', function() {
|
||||
return gulp.src(['gba2/user_scripts/**/*'])
|
||||
.pipe(uglify({
|
||||
mangle:true,
|
||||
compress:true,
|
||||
output: {
|
||||
comments: false //保留注释, all: 保留所有,some:只保留license等信息,false: 不保留,正则或者function
|
||||
}
|
||||
}))
|
||||
.pipe(javascriptObfuscator({
|
||||
compact:true,
|
||||
sourceMap: false,
|
||||
debugProtection: true,
|
||||
domainLock: ['kingsome.cn', '.zhl.com']
|
||||
}))
|
||||
.pipe(stripDebug())
|
||||
.pipe(gulp.dest('dist/gba2/user_scripts'));
|
||||
})
|
||||
@ -130,3 +131,4 @@ var gulp = require('gulp'),
|
||||
.pipe(gulp.dest('dist/assets'));
|
||||
})
|
||||
gulp.task('default', ['disthtml', 'distfc', 'distgba', 'distgba2', 'assets']);
|
||||
// gulp.task('default', ['disthtml', 'distfc', 'assets']);
|
||||
|
Loading…
x
Reference in New Issue
Block a user