1 | import fs from "fs";
|
2 | import path from "path";
|
3 | const ENV = process.env;
|
4 |
|
5 | var configFile = path.join(ENV.HOME, ".elong-static.js");
|
6 | var config = {};
|
7 | if(fs.existsSync(configFile)){
|
8 | config = require(configFile);
|
9 | }else{
|
10 | console.warn(`没有找到配置文件${configFile}`);
|
11 | config = function(){
|
12 | return null;
|
13 | };
|
14 | }
|
15 |
|
16 | export default {
|
17 | "tmp-dir": path.join(ENV.HOME || __dirname, ".enjoy-publish-tmp-dir"),
|
18 | "group-hash": {
|
19 | "ios": "rn",
|
20 | "android": "rn",
|
21 | "h5": "web",
|
22 | "hybrid": "web",
|
23 | "weixin": "web",
|
24 | "qq": "web",
|
25 | "seo": "web"
|
26 | },
|
27 | "gitlab": {
|
28 | "api-url": "http://git.17usoft.com/api/v3",
|
29 | "private-token": "f1xnbK4Z81sFDa-_EtFD",
|
30 | "projects": {
|
31 | "framework-bundle": "3885"
|
32 | }
|
33 | },
|
34 |
|
35 | server: {
|
36 | local: {
|
37 |
|
38 | deps: "http://localhost:10002/deps?mod=",
|
39 | config: {
|
40 | base: "http://localhost:10002/mods?ids=",
|
41 | assetsPath: "http://localhost:10002/static"
|
42 | }
|
43 | },
|
44 | dev: {
|
45 | deps: config("dev") ? config("dev").apis.depdb + "?file=" : "",
|
46 | config: {
|
47 | base: "//m.elongstatic.com/combo/mods/??",
|
48 | assetsPath: "//m.elongstatic.com/combo/mods/assets"
|
49 | }
|
50 | },
|
51 | test: {
|
52 | deps: config("test") ? config("test").apis.depdb + "?file=" : "",
|
53 | config: {
|
54 | base: "//m.elongstatic.com/combo/mods/??",
|
55 | assetsPath: "//m.elongstatic.com/combo/mods/assets"
|
56 | }
|
57 | },
|
58 | huidu: {
|
59 |
|
60 | deps: config("huidu") ? config("huidu").apis.depdb + "?file=" : "http://192.168.69.32:9707/enjoyinner/depdb?file=",
|
61 | config: {
|
62 | base: "//m.elongstatic.com/combo/mods/??",
|
63 | assetsPath: "//m.elongstatic.com/combo/mods/assets"
|
64 | }
|
65 | },
|
66 | release: {
|
67 |
|
68 | deps: config("release") ? config("release").apis.depdb + "?file=" : "",
|
69 | config: {
|
70 | base: "//m.elongstatic.com/combo/mods/??",
|
71 | assetsPath: "//m.elongstatic.com/combo/mods/assets"
|
72 | }
|
73 | }
|
74 | }
|
75 | }; |
\ | No newline at end of file |