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