@sap-ux/ui5-application-writer 0.16.0 → 0.16.1
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 +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -28,15 +28,16 @@ const ui5Libs_1 = require("./data/ui5Libs");
|
|
|
28
28
|
* @returns {*} {Promise<Editor>} the updated memfs editor instance
|
|
29
29
|
*/
|
|
30
30
|
function generate(basePath, ui5AppConfig, fs) {
|
|
31
|
-
var _a;
|
|
31
|
+
var _a, _b;
|
|
32
32
|
return __awaiter(this, void 0, void 0, function* () {
|
|
33
33
|
if (!fs) {
|
|
34
34
|
fs = mem_fs_editor_1.create(mem_fs_1.create());
|
|
35
35
|
}
|
|
36
36
|
const ui5App = data_1.mergeWithDefaults(ui5AppConfig);
|
|
37
37
|
const tmplPath = path_1.join(__dirname, '..', 'templates');
|
|
38
|
+
const ignore = [((_a = ui5AppConfig.appOptions) === null || _a === void 0 ? void 0 : _a.typescript) ? '**/*.js' : '**/*.ts'];
|
|
38
39
|
fs.copyTpl(path_1.join(tmplPath, 'core', '**/*.*'), path_1.join(basePath), ui5App, undefined, {
|
|
39
|
-
globOptions: { dot: true },
|
|
40
|
+
globOptions: { dot: true, ignore },
|
|
40
41
|
processDestinationPath: (filePath) => filePath.replace(/gitignore.tmpl/g, '.gitignore')
|
|
41
42
|
});
|
|
42
43
|
// ui5.yaml
|
|
@@ -44,7 +45,7 @@ function generate(basePath, ui5AppConfig, fs) {
|
|
|
44
45
|
const ui5Config = yield ui5_config_1.UI5Config.newInstance(fs.read(ui5ConfigPath));
|
|
45
46
|
ui5Config.addFioriToolsProxydMiddleware({
|
|
46
47
|
ui5: {
|
|
47
|
-
url: (
|
|
48
|
+
url: (_b = ui5App.ui5) === null || _b === void 0 ? void 0 : _b.frameworkUrl
|
|
48
49
|
}
|
|
49
50
|
});
|
|
50
51
|
ui5Config.addFioriToolsAppReloadMiddleware();
|
|
@@ -78,7 +79,6 @@ function generate(basePath, ui5AppConfig, fs) {
|
|
|
78
79
|
}
|
|
79
80
|
});
|
|
80
81
|
if (ui5App.appOptions.typescript) {
|
|
81
|
-
fs.delete(path_1.join(basePath, 'webapp/Component.js'));
|
|
82
82
|
ui5Config.addCustomMiddleware(ui5Libs_1.ui5TsMiddlewares);
|
|
83
83
|
ui5Config.addCustomTasks(ui5Libs_1.ui5TsTasks);
|
|
84
84
|
ui5LocalConfig.addCustomMiddleware(ui5Libs_1.ui5TsMiddlewares);
|
package/package.json
CHANGED