提交 b2737023 作者: 毛细亚

审核通过的包

上级 b967585a
{
"path-autocomplete.pathMappings": {
"@": "${folder}/src/",
"@views": "${folder}/src/views/",
}
}
\ No newline at end of file
module.exports = {
// 自己的混淆配置
my: {
stringArray: true, // 压缩成一行
stringArray: true, // 压缩成一行 删除字符串文字并将它们放在一个特殊的数组中。例如,字符串"Hello World"invar m = "Hello World";将被替换为类似var m = _0x12c456[0x1];
// 僵尸代码
deadCodeInjection: true,
deadCodeInjectionThreshold: 1,
// debugProtection: true,// 此选项几乎不可能使用开发者工具的控制台选项卡
// debugProtectionInterval: true,// 如果选中,则会在“控制台”选项卡上使用间隔强制调试模式,从而更难使用“开发人员工具”的其他功能。
deadCodeInjectionThreshold: 0.6,
// controlFlowFlatteningThreshold:0.75,// 此设置对于大型代码特别有用,因为大量的控制流转换会减慢您的代码并增加代码大小。
debugProtection: false,// 此选项几乎不可能使用开发者工具的控制台选项卡
debugProtectionInterval: false,// 如果选中,则会在“控制台”选项卡上使用间隔强制调试模式,从而更难使用“开发人员工具”的其他功能。
log: true,// 是否允许将信息记录到控制台。
// disableConsoleOutput: false,// 通过用空函数替换它们来禁用console.log,console.info,console.error和console.warn。这使得调试器的使用更加困难。
// identifierNamesGenerator: 'hexadecimal', //标识符的混淆方式 hexadecimal(十六进制) mangled(短标识符)
identifiersPrefix:'_zwan_',//全局标识符添加特定前缀,在混淆同一页面上加载的多个文件时使用此选项。此选项有助于避免这些文件的全局标识符之间发生冲突。为每个文件使用不同的前缀
inputFileName: '',
disableConsoleOutput: false,// 通过用空函数替换它们来禁用console.log,console.info,console.error和console.warn。这使得调试器的使用更加困难。
// identifierNamesGenerator: 'mangled-shuffled', //标识符的混淆方式 hexadecimal(十六进制) mangled(短标识符) dictionary 需要与identifiersDictionary同时使用 mangled-shuffled 和 mangled 相同 但是字母会被打乱
// identifiersDictionary:['_zw_,_mxy_,_zwan_,-nzy_'],//dictionary选项设置标识符字典。字典中的每个标识符将用于几个变体,每个字符的大小写不同。因此,字典中标识符的数量应取决于原始源代码中的标识符数量。
identifiersPrefix:'_mxy_',//全局标识符添加特定前缀,在混淆同一页面上加载的多个文件时使用此选项。此选项有助于避免这些文件的全局标识符之间发生冲突。为每个文件使用不同的前缀
// identifierNamesCache:{}, // 此选项的主要目标是能够在混淆多个源/文件期间使用相同的标识符名称。
// inputFileName: 'main.js',
// numbersToExpressions:true,//启用数字到表达式的转换 会将数字转化为表达式的形式 eg:const foo = 1234; output const foo=-0xd93+-0x10b4+0x41*0x67+0x84e*0x3+-0xff8;
renameGlobals: true,// 是否启用全局变量和函数名称的混淆
// renameProperties:true,//启用属性名称的重命名。所有内置 DOM 属性和核心 JavaScript 类中的属性都将被忽略。这个打开会报错
// simplify:true,// 通过简化实现额外的代码混淆。
rotateStringArray: true,// 通过固定和随机(在代码混淆时生成)的位置移动数组。这使得将删除的字符串的顺序与其原始位置相匹配变得更加困难。如果原始源代码不小,建议使用此选项,因为辅助函数可以引起注意
// 编码的所有字符串文字stringArray使用base64或rc4并插入即用其解码回在运行时的特殊代码。true(boolean):stringArray使用编码值base64;false(boolean):不编码stringArray值;'base64'(string):stringArray使用编码值base64;'rc4'(string):stringArray使用编码值rc4。大约慢30-50%base64,但更难获得初始值。建议禁用unicodeEscapeSequence带rc4编码的选项以防止非常大的混淆代码。
// splitStrings:true,//将文字字符串拆分为具有splitStringsChunkLength选项值长度的块。
// splitStringsChunkLength:0.5,//设置splitStrings选项的块长度。
stringArrayEncoding: ['none'],
stringArrayThreshold:0.5,
stringArrayThreshold:0,
stringArrayIndexShift:true,// 为所有字符串数组调用启用额外的索引移位
stringArrayShuffle:true,//随机打乱stringArray数组项。
// stringArrayWrappersCount:1,//设置string array每个根或函数作用域内部的包装器计数。每个范围内的实际包装器数量literal受此范围内节点数的限制。
selfDefending: false,// 混淆后不能时使用代码美化
// 允许启用/禁用字符串转换为unicode转义序列。Unicode转义序列大大增加了代码大小,并且可以轻松地将字符串恢复为原始视图。建议仅对小型源代码启用此选项。
target: 'browser',
// 是否启用混淆对象键
transformObjectKeys: true,
unicodeEscapeSequence: false
},
// 轻度的混淆配置
simple: {
compact: true,
controlFlowFlattening: false,
deadCodeInjection: false,
debugProtection: false,
debugProtectionInterval: false,
disableConsoleOutput: true,
identifierNamesGenerator: "hexadecimal",
log: false,
renameGlobals: false,
rotateStringArray: true,
selfDefending: true,
stringArray: true,
stringArrayEncoding: ['rc4'],
stringArrayThreshold: 1,
unicodeEscapeSequence: false,
},
// 中度的混淆配置
ordinary: {
compact: true,
controlFlowFlattening: true,
controlFlowFlatteningThreshold: 0.75,
deadCodeInjection: true,
deadCodeInjectionThreshold: 0.4,
debugProtection: false,
debugProtectionInterval: false,
disableConsoleOutput: true,
identifierNamesGenerator: "hexadecimal",
log: false,
renameGlobals: false,
rotateStringArray: true,
selfDefending: true,
stringArray: true,
stringArrayEncoding: "base64",
stringArrayThreshold: 0.75,
transformObjectKeys: true,
unicodeEscapeSequence: false,
},
// 高度的混淆配置
highly: {
compact: true,
controlFlowFlattening: true,
controlFlowFlatteningThreshold: 1,
deadCodeInjection: true,
deadCodeInjectionThreshold: 1,
debugProtection: true,
debugProtectionInterval: true,
disableConsoleOutput: true,
identifierNamesGenerator: "hexadecimal",
log: false,
renameGlobals: false,
rotateStringArray: true,
selfDefending: true,
stringArray: true,
stringArrayEncoding: ["rc4"],
stringArrayThreshold: 1,
transformObjectKeys: true,
unicodeEscapeSequence: false,
}
}
const fileList = ['subpackage/main.min.js'] // 根目录为src文件夹
// const fileList = ['platform/platform.js']
const fileList = ['/subpackage/main.min.js'] // 根目录为src文件夹
module.exports = {
......
{
"scripts": {
"s": "rm -rf dist && cross-env ENVIROMENT=simple webpack ",
"o": "rm -rf dist && cross-env ENVIROMENT=ordinary webpack ",
"h": "rm -rf dist && cross-env ENVIROMENT=highly webpack",
"m": "rm -rf dist && cross-env ENVIROMENT=my webpack "
"build": "rm -rf dist && cross-env ENVIROMENT=my webpack "
},
"dependencies": {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
require('./weapp-adapter.js');
require('./manifest.js');
require('./egret.wxgame.js');
const { gameVersion } = require("./config/config.js");
//过审时候调整为true
window.MG_banshu = true;
window.js_copyright =
"著作权人 广州酷玩网络科技有限公司 出版单位名称 上海同济大学电子音像出版社\n著作权登记号 2013SR055848 批准文号 新广出审[2014]1090号 网络游戏出版物号 978-7-89404-095-4"+
"\n抵制不良游戏,拒绝盗版游戏。注意自我保护,谨防受骗上当。适度游戏益脑,沉迷游戏伤身。合理安排时间,享受健康生活。\n适龄提示:适合16岁以上使用";
window.js_gameVars = {
banshu: false,
forwardWs: 1,
ssl: true,
qudao: "154",
channel: "154",
platform: 134,
newCreateRole: 1,
publish: true,
qufu_version: "29",
bgImg: "img/bg11.jpg",
bgImg0: "img/bugu_bg0.jpg",
isMobile: 1,
monitormessage: true,
APIlocation: "https://ht-api.sszt.app.9125flying.com/",
subpackage: true,
client: -1,
qufuType: 3,
cfgZipName: "0config.zip",
zipTargetDir: "temp_config/",
newCfgZip: true, //是否有新的 0cfg.zip文件
loadedCfgZip: false, //新的0cfg.zip是否下载完成
cfgTotalCount: 6,
configUrl: "",
resUrl: "https://cdn.sszt.app.9125flying.com/shenqi_20210203/assets/resource/",
qufuCdnServer: "https://cdn.sszt.app.9125flying.com/shenqi_20210203/miniGame/",
cdnServerMTest: `https://cdn.sszt.app.9125flying.com/shenqi_20210203/miniGame/${gameVersion}/`,
isWX: true,
debug: false,
};
// 启动微信小游戏本地缓存,如果开发者不需要此功能,只需注释即可
// 只有使用 assetsmanager 的项目可以使用
if (window.RES && RES.processor) {
require('./library/image.js');
require('./library/text.js');
require('./library/binary.js');
}
egret.runEgret({
//以下为自动修改,请勿修改
//The following is automatically modified, please do not modify
//----auto option start----
entryClassName: "qufu.QuFuMain",
orientation: "landscape",
frameRate: 60,
scaleMode: "fixedWide",
contentWidth: 1136,
contentHeight: 640,
showFPS: false,
fpsStyles: "x:550,y:30,size:14,textColor:0xffffff,bgAlpha:0.6",
showLog: false,
maxTouches: 2,
//----auto option end----
renderMode: 'webgl',
audioType: 0,
calculateCanvasScaleFactor: function (context) {
var backingStore = context.backingStorePixelRatio ||
context.webkitBackingStorePixelRatio ||
context.mozBackingStorePixelRatio ||
context.msBackingStorePixelRatio ||
context.oBackingStorePixelRatio ||
context.backingStorePixelRatio || 1;
return (window.devicePixelRatio || 1) / backingStore;
}
});
platform.initialization();
{
"deviceOrientation": "landscapeRight",
"networkTimeout": {
"request": 50000,
"connectSocket": 50000,
"uploadFile": 50000,
"downloadFile": 50000
},
"subpackages": [
{
"name": "subpackage",
"root": "subpackage/main.min.js"
}
]
}
\ No newline at end of file
require("./js/egret.min.js")
require("./js/assetsmanager.min.js")
require("./js/tween.min.js")
require("./js/game.min.js")
require("./js/socket.min.js")
require("./js/eui.min.js")
require('./platform/platform.js');
require("./js/zlib.min.js")
require("./js/default.thm.min.js")
require("./js/qu.min.js")
{
"description": "项目配置文件。",
"setting": {
"urlCheck": true,
"es6": true,
"enhance": false,
"postcss": true,
"preloadBackgroundData": false,
"minified": true,
"newFeature": true,
"coverView": true,
"nodeModules": false,
"autoAudits": false,
"showShadowRootInWxmlPanel": true,
"scopeDataCheck": false,
"uglifyFileName": false,
"checkInvalidKey": true,
"checkSiteMap": true,
"uploadWithSourceMap": true,
"compileHotReLoad": false,
"lazyloadPlaceholderEnable": false,
"useMultiFrameRuntime": true,
"useApiHook": true,
"useApiHostProcess": true,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"enableEngineNative": false,
"useIsolateContext": true,
"userConfirmedBundleSwitch": false,
"packNpmManually": false,
"packNpmRelationList": [],
"minifyWXSS": true,
"disableUseStrict": false,
"showES6CompileOption": true,
"useCompilerPlugins": false
},
"compileType": "game",
"libVersion": "game",
"appid": "wx019705d363364589",
"projectname": "SQ-ZhangWang",
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},
"condition": {
"search": {
"list": []
},
"conversation": {
"list": []
},
"game": {
"list": []
},
"miniprogram": {
"list": []
}
}
}
\ No newline at end of file
### 1.src为你放需要打包文件的文件夹,需要注意的是,当你在build/fileList 里面 加入你想要打包的文件时,根目录为src, 比如 当你想打包 src/index.js 文件的时候 fileList=['./index.js']
### 2.注意事项 webpack mode 最好选择生产环境 选择开发环境 为了调试速度快 会启用 eval-cheap-souce-map eval-source-map 微信小程序里面没有eval函数 所以会报错;
### 3.stringArray: true,// 删除字符串文字并将它们放在一个特殊的数组中 这个属性打开 打包后的文件会报错 建议关闭
### 4.微信小程序的代码包最大为20m 请注意代码大小 identifierNamesGenerator: 'mangled' 用mangled短字符可以降低代码大小,降低stringArrayThreshold的值也可以 范围(0-1)
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论