@hyext/builder-revues 0.0.1-beta.16 → 0.0.1-beta.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +10 -5
- package/package.json +7 -7
package/dist/index.js
CHANGED
@@ -9,8 +9,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
9
9
|
|
10
10
|
var fs = require('fs-extra');
|
11
11
|
var path = require('path');
|
12
|
-
var codeCompiler = require('@revues/code-compiler');
|
13
12
|
var os = require('os');
|
13
|
+
var codeCompiler = require('@revues/code-compiler');
|
14
14
|
var chalk = require('chalk');
|
15
15
|
var util = require('util');
|
16
16
|
var glob = require('glob');
|
@@ -36,7 +36,8 @@ var EDeployMode;
|
|
36
36
|
EDeployMode[EDeployMode["Separate"] = 1] = "Separate";
|
37
37
|
})(EDeployMode || (EDeployMode = {}));
|
38
38
|
|
39
|
-
const
|
39
|
+
const tempDir = os__default["default"].tmpdir();
|
40
|
+
const cacheDir = path__default["default"].join(tempDir, '.revue_cache');
|
40
41
|
// 根据环境变量判断 要不要把运行框架代码留在项目内 还是 CDN
|
41
42
|
const deployMode = EDeployMode.Integration;
|
42
43
|
const staticPath = path__default["default"].resolve(__dirname, '../static' );
|
@@ -562,6 +563,9 @@ function mergePackage(projectConfig, outputPath, opts) {
|
|
562
563
|
logger.success('合并分包完成');
|
563
564
|
return entryInfo;
|
564
565
|
}
|
566
|
+
function getTempProjectDir(projectDir) {
|
567
|
+
return path__default["default"].join(tempDir, '.revues-projects', path__default["default"].basename(projectDir));
|
568
|
+
}
|
565
569
|
class RevueBuilder {
|
566
570
|
// 这里拿到打包好的代码 原样输出 + build result
|
567
571
|
async build(opts) {
|
@@ -581,7 +585,7 @@ class RevueBuilder {
|
|
581
585
|
}
|
582
586
|
async start(opts) {
|
583
587
|
const { debug, inputPath, projectConfig, outputPath: outputPath$1, config } = opts;
|
584
|
-
const outputPath =
|
588
|
+
const outputPath = getTempProjectDir(path__default["default"].dirname(inputPath)) ;
|
585
589
|
const processedConfig = processBuilderConfigJSON('development', config);
|
586
590
|
if (projectConfig.compileType == 'game') {
|
587
591
|
await watchGame(inputPath, outputPath, () => {
|
@@ -610,12 +614,13 @@ class RevueBuilder {
|
|
610
614
|
entrys[0]?.entryPath);
|
611
615
|
startLiveServer({
|
612
616
|
...processedConfig,
|
613
|
-
root: outputPath
|
617
|
+
root: outputPath,
|
618
|
+
ignore: "node_modules,"
|
614
619
|
});
|
615
620
|
return await makeBuildResults('development', {
|
616
621
|
entrys,
|
617
622
|
baseURI: getDevBaseURI(processedConfig),
|
618
|
-
outputPath
|
623
|
+
outputPath: outputPath$1
|
619
624
|
});
|
620
625
|
}
|
621
626
|
// 这里仅仅在 client 打包 小程序/小游戏
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@hyext/builder-revues",
|
3
|
-
"version": "0.0.1-beta.
|
3
|
+
"version": "0.0.1-beta.17",
|
4
4
|
"description": "> TODO: description",
|
5
5
|
"author": "diamondloler <857276958@qq.com>",
|
6
6
|
"homepage": "",
|
@@ -22,11 +22,11 @@
|
|
22
22
|
},
|
23
23
|
"scripts": {},
|
24
24
|
"dependencies": {
|
25
|
-
"@revues/cocos-web-adapter": "0.0.1-beta.
|
26
|
-
"@revues/code-compiler": "0.0.1-beta.
|
27
|
-
"@revues/hyext-adapter": "0.0.1-beta.
|
28
|
-
"@revues/web-frame": "0.0.1-beta.
|
29
|
-
"@revues/web-sdk-core": "0.0.1-beta.
|
25
|
+
"@revues/cocos-web-adapter": "0.0.1-beta.17",
|
26
|
+
"@revues/code-compiler": "0.0.1-beta.17",
|
27
|
+
"@revues/hyext-adapter": "0.0.1-beta.17",
|
28
|
+
"@revues/web-frame": "0.0.1-beta.17",
|
29
|
+
"@revues/web-sdk-core": "0.0.1-beta.17",
|
30
30
|
"archiver": "^7.0.1",
|
31
31
|
"chalk": "^2.4.2",
|
32
32
|
"fs-extra": "8.1.0",
|
@@ -41,5 +41,5 @@
|
|
41
41
|
"@types/live-server": "^1.2.3",
|
42
42
|
"@types/ramda": "^0.29.11"
|
43
43
|
},
|
44
|
-
"gitHead": "
|
44
|
+
"gitHead": "332f79f40eafdf245f74a41aa293c5031428d881"
|
45
45
|
}
|