Commit 2bb4eead authored by wildfirecode's avatar wildfirecode

1

parent d7fb756d
module.exports = {
devPort: 8080,
opn:0,
proxy: {
'/customActivity/*': 'http://localhost:3000',
'/ngapi/*': 'http://localhost:3000',
'/plugin/*': 'http://localhost:3000',
'/ngame/*': 'http://localhost:3000',
'/activityCommon/*': 'http://localhost:3000',
'/ctool/*': 'http://localhost:3000',
'/activityVist/*': 'http://localhost:3000',
'/collectGoods/*': 'http://localhost:3000',
'/activityPlugDrawInfo/*': 'http://localhost:3000',
'/collectRule/*': 'http://localhost:3000',
'/hdtool/*': 'http://localhost:3000',
'/activityPlugin/*': 'http://localhost:3000',
'/aaw/*': 'http://localhost:3000',
'/summer/*': 'http://localhost:3000'
}
}
\ No newline at end of file
# 所有空行或者以注释符号 # 开头的行都会被 Git 忽略。
# 可以使用标准的 glob 模式匹配。
# 匹配模式最后跟反斜杠(/)说明要忽略的是目录。
# 要忽略指定模式以外的文件或目录,可以在模式前加上惊叹号(! )取反。
# 所谓的 glob 模式是指 shell 所使用的简化了的正则表达式。星号(*)匹配零个或多个任
# 意字符; [abc] 匹配任何一个列在方括号中的字符(这个例子要么匹配一个 a,要么匹配一
# 个 b,要么匹配一个 c);问号(?)只匹配一个任意字符;如果在方括号中使用短划线分
# 隔两个字符,表示所有在这两个字符范围内的都可以匹配(比如 [0-9] 表示匹配所有 0 到
# 9 的数字)。
# 书上的一个例子
# #此为注释 – 将被 Git 忽略
# *.a
# 忽略所有 .a 结尾的文件
# !lib.a
# 但 lib.a 除外
# /TODO
# 仅仅忽略项目根目录下的 TODO 文件,不包括 subdir/TODO
# build/
# 忽略 build/ 目录下的所有文件
# doc/*.txt
# 会忽略 doc/notes.txt 但不包括 doc/server/arch.txt
node_modules
bin-release
.DS_Store
egret/.DS_Store
**/*/.tmproject
// let argvs = JSON.parse(process.env.npm_config_argv);
// let remain = argvs.remain;
let cmd = process.argv[2];
const DBGBuild = require('duiba-game-build');
const config = require('./.buildrc');
let build = new DBGBuild(config);
if (cmd === 'build' && process.argv[3] === 'prod') {
// if (cmd === 'build' && remain[1] === 'prod') {
cmd = 'buildProd';
if (process.argv[4] === 'ts')
cmd = 'buildProdTS';
if (process.argv[4] === 'exml')
cmd = 'buildProdEXML';
}
build[cmd]('egret');
console.log();
\ No newline at end of file
let inquirer = require('inquirer');
const spawn = require('cross-spawn');
const questions = require('./question');
let moment = require('moment');
const today = moment().format('YYYYMMDD');
inquirer.prompt(questions).then(answers => {
let cmdType = answers.commandType || '';
let skinName = answers.skinName || '';
let branchName = answers.branchName || '';
let cmd = '';
switch (cmdType) {
case 'create':
cmd = `npm run copy ${skinName}`;
break;
case 'create_react':
cmd = `npm run copy ${skinName} custom-react`;
break;
case 'prettier':
cmd = 'npm run lint';
break;
case 'develop':
cmd = `npm run dev ${skinName}`;
break;
case 'build_test':
cmd = `npm run build ${skinName}`;
break;
case 'build_prod':
cmd = `npm run build ${skinName} prod`;
break;
case 'backup':
cmd = `npm run backup`;
break;
case 'create_branch':
cmd = `git checkout -b feature/${today}-${branchName}`;
break;
default:
break;
}
if (cmd) {
cmd = cmd.split(' ');
let _cmd = cmd[0];
let _args = cmd.slice(1);
var ls = spawn(_cmd, _args);
ls.stdout.on('data', data => {
console.log(`${data}`);
});
ls.stderr.on('data', data => {
console.log(`stderr: ${data}`);
});
ls.on('close', code => {
// console.log(`子进程退出码:${code}`);
});
}
});
{
"global": {
"globalBindingDataTestObj": [],
"globalBackgroundAlpha": 100,
"globalBackgroundX": 0,
"globalBackgroundY": 0,
"globalBackgroundWidth": -1,
"globalBackgroundHeight": -1,
"globalBackgroundColor": "#ffffff",
"globalBackgroundImage": "/Users/wanghongyuan/db-game-template/egret/resource/assets/startScene/startscenebg.jpg",
"globalAutoLayerMarkEnable": true
},
"1667fb18fa6": {
"bindingDataTestObj": [
{
"key": "list",
"value": "[1,2]"
}
]
},
"16680af117c": {
"bindingDataTestObj": []
},
"16680af117d": {
"bindingDataTestObj": [
{
"key": "data.message",
"value": "积分不足 多赚点再来吧积分不足 多赚点再来吧积分不足 多赚点再来吧"
}
],
"backgroundType": "user",
"useBgImage": false,
"useBgColor": true,
"backgroundColor": "#b5b5b5"
},
"166f84e4ed7": {
"backgroundType": "null",
"useBgImage": true,
"useBgColor": true,
"backgroundX": 0,
"backgroundY": 0,
"backgroundWidth": -1,
"backgroundHeight": -1,
"backgroundAlpha": 100
},
"16705cb4eec": {
"backgroundType": "user",
"backgroundImage": "/Users/wanghongyuan/弹一弹-前端改.jpg",
"backgroundAlpha": 100,
"backgroundX": 0,
"backgroundY": 0,
"backgroundWidth": -1,
"backgroundHeight": -1,
"useBgImage": false,
"useBgColor": true,
"guideLinesEnabled": false
},
"168eafca12b": {
"backgroundType": "user",
"backgroundImage": "/Users/wanghongyuan/play.jpg",
"bindingDataTestObj": [
{
"key": "data.score",
"value": "111"
},
{
"key": "data.currentBallNums",
"value": "1"
}
],
"useBgImage": false,
"useBgColor": true,
"backgroundColor": "#dbdbdb"
},
"168ff8d4b66": {
"backgroundType": "user",
"useBgImage": false,
"useBgColor": true,
"backgroundColor": "#b2b2b2",
"bindingDataTestObj": [
{
"key": "data.message",
"value": "是否愿意花费10积分复活 并消去5行方块"
}
]
},
"16900129d3e": {
"backgroundType": "user",
"useBgImage": false,
"useBgColor": true,
"backgroundColor": "#b2b2b2"
},
"16900196890": {
"backgroundType": "user",
"useBgImage": false,
"useBgColor": true,
"backgroundColor": "#b7b7b7"
},
"169001ce5a5": {
"backgroundType": "user",
"useBgImage": false,
"useBgColor": true,
"backgroundColor": "#e2e2e2"
},
"169005181d0": {
"backgroundType": "user",
"useBgImage": false,
"useBgColor": true,
"backgroundColor": "#cecece",
"bindingDataTestObj": [
{
"key": "data.score",
"value": "本局分数 1234567890"
},
{
"key": "data.img",
"value": "http://yun.duiba.com.cn/babi/img/bm2ryg8wht.gif"
}
]
},
"1690063a75e": {
"backgroundType": "user",
"useBgImage": false,
"useBgColor": true,
"backgroundColor": "#d8d8d8",
"bindingDataTestObj": [
{
"key": "data.score",
"value": "123"
}
]
},
"16c89f4ae1a": {
"backgroundType": "user",
"useBgImage": false,
"useBgColor": true,
"backgroundColor": "#5da0aa",
"backgroundX": 0,
"backgroundY": 0,
"backgroundWidth": -1,
"backgroundHeight": -1,
"backgroundAlpha": 100
},
"16c945ea8db": {
"backgroundType": "user",
"useBgImage": false,
"useBgColor": true
},
"16c953f5068": {
"backgroundType": "user",
"useBgImage": false,
"useBgColor": true
},
"16c95475a4e": {
"backgroundType": "user",
"useBgImage": false,
"useBgColor": true
},
"16c984f7919": {
"backgroundType": "user",
"useBgImage": false,
"useBgColor": true
}
}
\ No newline at end of file
{
"version": "0.2.0",
"configurations": [
{
"name": "Wing 内置播放器调试",
"type": "chrome",
"request": "launch",
"file": "index.html",
//"url": "http://mysite.com/index.html",
"runtimeExecutable": "${execPath}",
"sourceMaps": true,
"webRoot": "${workspaceRoot}",
"preLaunchTask":"build",
"port":5826
},
{
"name": "使用本机 Chrome 调试",
"type": "chrome",
"request": "launch",
"file": "index.html",
//"url": "http://mysite.com/index.html",
"runtimeExecutable": "",
"sourceMaps": true,
"webRoot": "${workspaceRoot}",
"preLaunchTask":"build",
"userDataDir":"${tmpdir}",
"port":5826
}
]
}
\ No newline at end of file
{
"version": "0.1.0",
"command": "egret",
"isShellCommand": true,
"tasks": [
{
"taskName": "build",
"showOutput": "always",
"args": [
"build",
"-sourcemap"
],
"problemMatcher": "$tsc"
},
{
"taskName": "clean",
"showOutput": "always",
"args": [
"build",
"-e"
],
"problemMatcher": "$tsc"
},
{
"taskName": "publish",
"showOutput": "always",
"args": [
"publish"
],
"problemMatcher": "$tsc"
}
]
}
\ No newline at end of file
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var fs = require("fs");
var path = require("path");
var resjsons = ["resource/default.res.json"];
//要扫描的res.json文件
var targetDir = "resource/TextureMerger";
//输出目录
var pathNor = path.relative(targetDir, "resource");
//返回一个相对路径
var tempindex = 0;
//创建输出文件夹
if (resjsons.length > 0) {
if (!fs.existsSync(targetDir)) {
// var paths = path.normalize(targetDir).split("\\"); //windows 下使用
var paths = path.normalize(targetDir).split("\/");
//mac linux 下使用
var target = ".";
for (var _i = 0,
paths_1 = paths; _i < paths_1.length; _i++) {
var p = paths_1[_i];
// target += ("\\" + p); // windows 下使用
target += ("\/" + p);
// mac linux 下使用
if (!fs.existsSync(target))
// 根据路径创建文件夹
fs.mkdirSync(target);
}
}
}
var _loop_1 = function (resJson) {
// 判断是否是res.json文件
if (fs.existsSync(resJson) && resJson.indexOf("res.json") > -1) {
var defaultJson = fs.readFileSync(resJson, "utf-8");
// 解析res.json文件内容
var defaultObject = JSON.parse(defaultJson);
var groups = defaultObject.groups;
//组
var resources = defaultObject.resources;
//资源
var resourcesHash_1 = {};
// 用来存放resources的资源信息
// 遍历resources
for (var _i = 0,
resources_1 = resources; _i < resources_1.length; _i++) {
var resource = resources_1[_i];
resourcesHash_1[resource.name] = resource.url;
}
// 遍历groups
for (var _a = 0,
groups_1 = groups; _a < groups_1.length; _a++) {
var group = groups_1[_a];
var tmproject = {};
//用来存放tmproject文件的信息
// tmproject文件配置
tmproject["options"] = {
"layoutMath": "2",
"sizeMode": "2n",
"useExtension": 1,
"layoutGap": 1,
"extend": 0
};
// projectName
tmproject["projectName"] = group.name;
// tmproject["projectName"] = group.name + "_" + tempindex;
// 版本
tmproject["version"] = 5;
tempindex++;
// 获取res.json分组的keys, 并分割成数组
var oldkeys = group.keys.split(",");
var oldkeysHash = {};
// 遍历oldkeys
for (var _b = 0,
oldkeys_1 = oldkeys; _b < oldkeys_1.length; _b++) {
var key = oldkeys_1[_b];
// 保存到oldkeysHash对象中
oldkeysHash[key] = true;
}
var newKeys = [];
// 遍历oldkeys
for (var _c = 0,
oldkeys_2 = oldkeys; _c < oldkeys_2.length; _c++) {
var key = oldkeys_2[_c];
if (key.indexOf("json") == -1) {
if (!oldkeysHash[key.replace("png", "json")]) {
//粒子和龙骨对应的图集不合图
if (!oldkeysHash[key.replace("png", "fnt")])
//位图字体
newKeys.push(key);
}
// else
// if (key.indexOf("jpg") > -1) {
// newKeys.push(key);
// }
}
}
oldkeysHash = {};
oldkeys = [];
// files路径
var urls = newKeys.map(function (key) {
return path.join(pathNor, resourcesHash_1[key]);
});
tmproject["files"] = urls;
// 根据tmproject写入文件
if (urls.length > 0) {
fs.writeFileSync(path.join(targetDir, tmproject["projectName"] + ".tmproject"), JSON.stringify(tmproject));
console.log('==> '+tmproject["projectName"] + '.tmproject创建完毕.')
}
tmproject = {};
}
}
};
//根据数组开始扫描
for (var _a = 0,
resjsons_1 = resjsons; _a < resjsons_1.length; _a++) {
var resJson = resjsons_1[_a];
_loop_1(resJson);
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment