ics-builder 4.3.0 → 4.4.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ics-builder",
3
- "version": "4.3.0",
3
+ "version": "4.4.0",
4
4
  "description": "",
5
5
  "main": "./src/app.js",
6
6
  "preferGlobal": true,
@@ -87,6 +87,7 @@ var WebpackUiBuilder = /** @class */ (function (_super) {
87
87
  this.buildModules();
88
88
  return;
89
89
  }
90
+ this.executePreBuildTask();
90
91
  var webpackStylesConfig = this.getWebpackStylesConfig();
91
92
  var webpackConfig = this.getWebpackConfig();
92
93
  return new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () {
@@ -134,6 +135,20 @@ var WebpackUiBuilder = /** @class */ (function (_super) {
134
135
  });
135
136
  });
136
137
  };
138
+ WebpackUiBuilder.prototype.executePreBuildTask = function () {
139
+ var _this = this;
140
+ this.config.packages.forEach(function (pkg) {
141
+ var _a;
142
+ var uiDirectory = path.join(_this.config.paths.source, pkg.name, "ui");
143
+ var packageJsonPath = path.join(uiDirectory, "package.json");
144
+ if (!utils_1.Utils.ensurePath(packageJsonPath))
145
+ return;
146
+ var packageJsonContent = require(packageJsonPath);
147
+ var preBuildTask = (_a = packageJsonContent === null || packageJsonContent === void 0 ? void 0 : packageJsonContent.scripts) === null || _a === void 0 ? void 0 : _a.preBuild;
148
+ if (preBuildTask)
149
+ utils_1.Utils.exec(preBuildTask, { cwd: uiDirectory });
150
+ });
151
+ };
137
152
  WebpackUiBuilder.prototype.saveUiSettings = function () {
138
153
  var settings = {
139
154
  builder: this.config.version || "4.1",
@@ -256,9 +271,7 @@ var WebpackUiBuilder = /** @class */ (function (_super) {
256
271
  },
257
272
  {
258
273
  test: /\.(woff(2)?|ttf|eot)(\?v=\d+\.\d+\.\d+)?$/,
259
- exclude: [
260
- /monaco-editor/gi
261
- ],
274
+ exclude: [/monaco-editor/gi],
262
275
  use: {
263
276
  loader: "file-loader",
264
277
  options: {