Lines 1-37javascript
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.buildScript = buildScript;
4var frontend_components_config_utilities_1 = require("@redhat-cloud-services/frontend-components-config-utilities");
5var common_1 = require("./common");
6var path_1 = require("path");
7var child_process_1 = require("child_process");
8function buildScript(argv, cwd) {
HighChild Process
Package source references child process execution.
bin/build-script.jsView on unpkg · L6 10 if (typeof argv.webpackConfig !== 'undefined') {
11 configPath = (0, common_1.getWebpackConfigPath)(argv.webpackConfig, cwd);
14 (0, common_1.validateFECConfig)(cwd);
15 configPath = (0, path_1.resolve)(__dirname, './prod.webpack.config.js');
17 process.env.NODE_ENV = 'production';
18 var subprocess = (0, child_process_1.spawn)("npm exec -- webpack -c ".concat(configPath), [], {
19 stdio: [process.stdout, process.stdout, process.stdout],
HighRuntime Package Install
Package source invokes a package manager install command at runtime.
bin/build-script.jsView on unpkg · L17 23 subprocess.on('error', function (err) {
24 (0, frontend_components_config_utilities_1.fecLogger)(frontend_components_config_utilities_1.LogType.error, err);
27 subprocess.on('exit', function (code, signal) {
29 (0, frontend_components_config_utilities_1.fecLogger)(frontend_components_config_utilities_1.LogType.error, 'Exited with code', code);
33 (0, frontend_components_config_utilities_1.fecLogger)(frontend_components_config_utilities_1.LogType.error, 'Exited with signal', signal);
37 (0, frontend_components_config_utilities_1.fecLogger)(frontend_components_config_utilities_1.LogType.info, 'Exited Okay');