@sap-ux/ui5-application-writer 0.20.0 → 0.21.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/dist/index.js CHANGED
@@ -27,7 +27,7 @@ const defaults_1 = require("./data/defaults");
27
27
  * @returns the updated memfs editor instance
28
28
  */
29
29
  function generate(basePath, ui5AppConfig, fs) {
30
- var _a, _b;
30
+ var _a, _b, _c;
31
31
  return __awaiter(this, void 0, void 0, function* () {
32
32
  if (!fs) {
33
33
  fs = (0, mem_fs_editor_1.create)((0, mem_fs_1.create)());
@@ -35,6 +35,9 @@ function generate(basePath, ui5AppConfig, fs) {
35
35
  const ui5App = (0, data_1.mergeWithDefaults)(ui5AppConfig);
36
36
  const tmplPath = (0, path_1.join)(__dirname, '..', 'templates');
37
37
  const ignore = [((_a = ui5AppConfig.appOptions) === null || _a === void 0 ? void 0 : _a.typescript) ? '**/*.js' : '**/*.ts'];
38
+ if (((_b = ui5AppConfig.appOptions) === null || _b === void 0 ? void 0 : _b.generateIndex) === false) {
39
+ ignore.push('**/webapp/index.html');
40
+ }
38
41
  fs.copyTpl((0, path_1.join)(tmplPath, 'core', '**/*.*'), (0, path_1.join)(basePath), ui5App, undefined, {
39
42
  globOptions: { dot: true, ignore },
40
43
  processDestinationPath: (filePath) => filePath.replace(/gitignore.tmpl/g, '.gitignore')
@@ -44,7 +47,7 @@ function generate(basePath, ui5AppConfig, fs) {
44
47
  const ui5Config = yield ui5_config_1.UI5Config.newInstance(fs.read(ui5ConfigPath));
45
48
  ui5Config.addFioriToolsProxydMiddleware({
46
49
  ui5: {
47
- url: (_b = ui5App.ui5) === null || _b === void 0 ? void 0 : _b.frameworkUrl
50
+ url: (_c = ui5App.ui5) === null || _c === void 0 ? void 0 : _c.frameworkUrl
48
51
  }
49
52
  });
50
53
  ui5Config.addFioriToolsAppReloadMiddleware();
package/dist/types.d.ts CHANGED
@@ -64,6 +64,10 @@ export interface AppOptions {
64
64
  * Enable support for importing functionality from npm packages in UI5 applications
65
65
  */
66
66
  npmPackageConsumption: boolean;
67
+ /**
68
+ * Excludes the index.html from the template and does not add the `start-noflp` script in package.json
69
+ */
70
+ generateIndex?: boolean;
67
71
  }
68
72
  export interface Ui5App {
69
73
  app: App;
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "bugs": {
10
10
  "url": "https://github.com/SAP/open-ux-tools/issues?q=is%3Aopen+is%3Aissue+label%3Abug+label%3Aui5-application-writer"
11
11
  },
12
- "version": "0.20.0",
12
+ "version": "0.21.0",
13
13
  "license": "Apache-2.0",
14
14
  "main": "dist/index.js",
15
15
  "files": [