@24i/smartapps-bigscreen-rnv-build-engine 0.15.0 → 0.15.1-alpha.1954
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.
|
@@ -1,6 +1,48 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.configureWebProject = exports.buildCoreWebpackProject = void 0;
|
|
7
|
+
const path_1 = __importDefault(require("path"));
|
|
8
|
+
const ip_1 = __importDefault(require("ip"));
|
|
9
|
+
const rnv_1 = require("rnv");
|
|
10
|
+
const getWebpackPath = () => {
|
|
11
|
+
const binWebpackJs = 'bin/webpack.js';
|
|
12
|
+
const WEBPACK = path_1.default.join(__dirname, '../../../node_modules/webpack', binWebpackJs);
|
|
13
|
+
if (rnv_1.FileUtils.fsExistsSync(WEBPACK)) {
|
|
14
|
+
return WEBPACK;
|
|
15
|
+
}
|
|
16
|
+
const WP_ALTERNATIVE = `${rnv_1.Resolver.doResolve('webpack')}/${binWebpackJs}`;
|
|
17
|
+
if (rnv_1.FileUtils.fsExistsSync(WP_ALTERNATIVE)) {
|
|
18
|
+
return WP_ALTERNATIVE;
|
|
19
|
+
}
|
|
20
|
+
return '';
|
|
21
|
+
};
|
|
22
|
+
const buildCoreWebpackProject = async (c) => {
|
|
23
|
+
const { debug, debugIp } = c.program;
|
|
24
|
+
const { appId } = c.runtime;
|
|
25
|
+
const { platform } = c;
|
|
26
|
+
rnv_1.Logger.logTask('buildCoreWebpackProject');
|
|
27
|
+
let debugVariables = '';
|
|
28
|
+
if (debug) {
|
|
29
|
+
rnv_1.Logger.logInfo(`Starting a remote debugger build with ip ${debugIp
|
|
30
|
+
|| ip_1.default.address()}. If this IP is not correct, you can always override it with --debugIp`);
|
|
31
|
+
debugVariables += `DEBUG=true DEBUG_IP=${debugIp || ip_1.default.address()}`;
|
|
32
|
+
}
|
|
33
|
+
const environment = rnv_1.Common.getConfigProp(c, platform, 'environment', 'production');
|
|
34
|
+
const configName = environment === 'production' ? 'prod' : 'dev';
|
|
35
|
+
const wp = getWebpackPath();
|
|
36
|
+
if (wp === '') {
|
|
37
|
+
rnv_1.Logger.logWarning('Webpack not found. Will try to use globally installed one');
|
|
38
|
+
}
|
|
39
|
+
const envVars = `PLATFORM=${platform} NODE_ENV=${environment} ${debugVariables}`;
|
|
40
|
+
const wpConfigPath = `./platformBuilds/${appId}_${platform}/webpack.config.${configName}.js`;
|
|
41
|
+
const wpCmd = `node ${wp} build --config ${wpConfigPath}`;
|
|
42
|
+
await rnv_1.Exec.executeAsync(c, `npx cross-env ${envVars} ${wpCmd}`);
|
|
43
|
+
const coloredBuildDir = rnv_1.Logger.chalk().cyan(rnv_1.Common.getPlatformProjectDir(c));
|
|
44
|
+
rnv_1.Logger.logSuccess(`Your build is located in ${coloredBuildDir}.`);
|
|
45
|
+
};
|
|
46
|
+
exports.buildCoreWebpackProject = buildCoreWebpackProject;
|
|
4
47
|
var sdk_webpack_1 = require("@rnv/sdk-webpack");
|
|
5
|
-
Object.defineProperty(exports, "buildCoreWebpackProject", { enumerable: true, get: function () { return sdk_webpack_1.buildCoreWebpackProject; } });
|
|
6
48
|
Object.defineProperty(exports, "configureWebProject", { enumerable: true, get: function () { return sdk_webpack_1.configureWebProject; } });
|
|
@@ -1,26 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
3
|
exports.customRnvStartTask = void 0;
|
|
23
|
-
const open = __importStar(require("better-opn"));
|
|
24
4
|
const rnv_1 = require("rnv");
|
|
25
5
|
const sdk_webpack_1 = require("@rnv/sdk-webpack");
|
|
26
6
|
const constants_1 = require("../constants");
|
|
@@ -37,11 +17,6 @@ const startFn = async (c, parentTask, originTask) => {
|
|
|
37
17
|
if (!parentTask) {
|
|
38
18
|
await executeTask(c, TASK_CONFIGURE, TASK_START, originTask);
|
|
39
19
|
}
|
|
40
|
-
if (hosted) {
|
|
41
|
-
(0, sdk_webpack_1.waitForWebpack)(c)
|
|
42
|
-
.then(() => open(`http://${c.runtime.localhost}:${port}/`))
|
|
43
|
-
.catch(logError);
|
|
44
|
-
}
|
|
45
20
|
const bundleAssets = getConfigProp(c, c.platform, 'bundleAssets');
|
|
46
21
|
const isDebuggerEnabledForPlatform = REMOTE_DEBUGGER_ENABLED_PLATFORMS.includes(platform);
|
|
47
22
|
const isWeinreEnabled = isDebuggerEnabledForPlatform && !bundleAssets && !hosted;
|
|
@@ -44,7 +44,11 @@ const runSpritesmith = (config) => (new Promise((resolve) => {
|
|
|
44
44
|
const spritesmith = config.plugins[0];
|
|
45
45
|
spritesmith.apply(webpackCompiler);
|
|
46
46
|
spritesmith.compile(() => {
|
|
47
|
-
|
|
47
|
+
webpackCompiler.close((err) => {
|
|
48
|
+
if (err instanceof Error) {
|
|
49
|
+
console.log(`Error during generating PNG spritesheet: ${err.message}`);
|
|
50
|
+
}
|
|
51
|
+
});
|
|
48
52
|
resolve();
|
|
49
53
|
});
|
|
50
54
|
}));
|
|
@@ -74,23 +74,19 @@ const makeRules = (config, projectDir, isDevServer) => ({
|
|
|
74
74
|
},
|
|
75
75
|
image: {
|
|
76
76
|
test: /\.(gif|jpe?g|png|svg)$/,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
publicPath: '../assets/',
|
|
82
|
-
},
|
|
77
|
+
type: 'asset/resource',
|
|
78
|
+
generator: {
|
|
79
|
+
outputPath: 'content/assets/',
|
|
80
|
+
publicPath: '../assets/',
|
|
83
81
|
},
|
|
84
82
|
},
|
|
85
83
|
fonts: {
|
|
86
84
|
test: /\.(woff|woff2|eot|ttf|otf)(\?[\s\S]+)?$/,
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
},
|
|
93
|
-
},
|
|
85
|
+
type: 'asset/resource',
|
|
86
|
+
generator: {
|
|
87
|
+
outputPath: 'content/fonts/',
|
|
88
|
+
publicPath: '../fonts/',
|
|
89
|
+
}
|
|
94
90
|
},
|
|
95
91
|
sourcemap: {
|
|
96
92
|
test: /\.[tj]sx$/,
|
|
@@ -141,7 +137,6 @@ function generateConfig(config) {
|
|
|
141
137
|
const plugins = {
|
|
142
138
|
forkTsChecker: new fork_ts_checker_webpack_plugin_1.default({
|
|
143
139
|
typescript: {
|
|
144
|
-
enabled: true,
|
|
145
140
|
memoryLimit: 4096,
|
|
146
141
|
},
|
|
147
142
|
}),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@24i/smartapps-bigscreen-rnv-build-engine",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.1-alpha.1954+bb29ac41",
|
|
4
4
|
"description": "Package with build engine for SmartApps BIGscreen projects...",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -33,56 +33,55 @@
|
|
|
33
33
|
"version": "^4.2.8"
|
|
34
34
|
}
|
|
35
35
|
],
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"xml2js": "^0.4.23"
|
|
38
|
+
},
|
|
36
39
|
"devDependencies": {
|
|
37
40
|
"@types/inquirer": "8.2.1",
|
|
38
|
-
"@types/
|
|
41
|
+
"@types/ip": "1.1.0",
|
|
39
42
|
"@types/node": "17.0.31",
|
|
40
43
|
"@types/semver": "7.3.9",
|
|
41
44
|
"@types/ssh2": "0.5.52",
|
|
42
|
-
"@types/tapable": "
|
|
43
|
-
"@types/webpack": "
|
|
44
|
-
"@types/xml2js": "
|
|
45
|
+
"@types/tapable": "2.2.2",
|
|
46
|
+
"@types/webpack": "5.28.0",
|
|
47
|
+
"@types/xml2js": "0.4.11",
|
|
45
48
|
"nock": "13.2.4",
|
|
46
49
|
"svgo": "1.3.2"
|
|
47
50
|
},
|
|
48
51
|
"peerDependencies": {
|
|
49
52
|
"@24i/smartapps-bigscreen-device": "*",
|
|
50
53
|
"@rnv/sdk-webpack": "0.35.0-alpha.2",
|
|
51
|
-
"assign-deep": "
|
|
52
|
-
"
|
|
53
|
-
"core-js": "3.15.2",
|
|
54
|
+
"assign-deep": "1.0.1",
|
|
55
|
+
"core-js": "3.22.4",
|
|
54
56
|
"coveralls": "3.1.1",
|
|
55
57
|
"css-hot-loader": "1.4.4",
|
|
56
58
|
"css-loader": "5.2.7",
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"html-webpack-
|
|
62
|
-
"
|
|
63
|
-
"manifoldjs-windows10": "
|
|
64
|
-
"mini-css-extract-plugin": "
|
|
65
|
-
"node-ssh": "
|
|
59
|
+
"filemanager-webpack-plugin": "6.1.7",
|
|
60
|
+
"fork-ts-checker-webpack-plugin": "7.2.11",
|
|
61
|
+
"glob": "8.0.1",
|
|
62
|
+
"html-webpack-harddisk-plugin": "2.0.0",
|
|
63
|
+
"html-webpack-plugin": "5.5.0",
|
|
64
|
+
"ip": "1.1.5",
|
|
65
|
+
"manifoldjs-windows10": "0.1.8",
|
|
66
|
+
"mini-css-extract-plugin": "2.6.0",
|
|
67
|
+
"node-ssh": "12.0.4",
|
|
66
68
|
"ora": "5.4.1",
|
|
67
69
|
"raf": "3.4.1",
|
|
68
|
-
"regenerator-runtime": "0.13.
|
|
70
|
+
"regenerator-runtime": "0.13.9",
|
|
69
71
|
"renative-template-blank": "0.35.0-alpha.2",
|
|
70
72
|
"rnv": "0.35.0-alpha.2",
|
|
71
|
-
"sass": "1.
|
|
72
|
-
"sass-loader": "
|
|
73
|
-
"source-map-loader": "
|
|
73
|
+
"sass": "1.51.0",
|
|
74
|
+
"sass-loader": "12.6.0",
|
|
75
|
+
"source-map-loader": "3.0.1",
|
|
74
76
|
"svgo": "1.3.2",
|
|
75
|
-
"ts-loader": "
|
|
76
|
-
"webpack": "
|
|
77
|
-
"webpack-cli": "
|
|
78
|
-
"webpack-dev-server": "
|
|
79
|
-
"webpack-spritesmith": "
|
|
77
|
+
"ts-loader": "9.3.0",
|
|
78
|
+
"webpack": "5.72.0",
|
|
79
|
+
"webpack-cli": "4.9.2",
|
|
80
|
+
"webpack-dev-server": "4.9.0",
|
|
81
|
+
"webpack-spritesmith": "1.1.0"
|
|
80
82
|
},
|
|
81
83
|
"keywords": [],
|
|
82
84
|
"author": "24i",
|
|
83
85
|
"license": "ISC",
|
|
84
|
-
"gitHead": "
|
|
85
|
-
"dependencies": {
|
|
86
|
-
"xml2js": "^0.4.23"
|
|
87
|
-
}
|
|
86
|
+
"gitHead": "bb29ac41af6b9d2d55785a34dc7ca7fad5b2aa63"
|
|
88
87
|
}
|