@sap-ux/fiori-generator-shared 0.1.1 → 0.2.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/cap/index.js +3 -4
- package/package.json +3 -2
- package/templates/README.md +40 -0
package/dist/cap/index.js
CHANGED
|
@@ -11,7 +11,6 @@ const path_1 = require("path");
|
|
|
11
11
|
* @returns cap custom paths
|
|
12
12
|
*/
|
|
13
13
|
function getCapFolderPathsSync(capProjectPath) {
|
|
14
|
-
var _a, _b, _c;
|
|
15
14
|
const capPaths = {
|
|
16
15
|
app: 'app/',
|
|
17
16
|
db: 'db/',
|
|
@@ -25,10 +24,10 @@ function getCapFolderPathsSync(capProjectPath) {
|
|
|
25
24
|
const config = JSON.parse((0, fs_1.readFileSync)(configFile).toString());
|
|
26
25
|
for (const folder of Object.keys(capPaths)) {
|
|
27
26
|
let customPath;
|
|
28
|
-
if (
|
|
27
|
+
if (config?.folders?.[folder]) {
|
|
29
28
|
customPath = config.folders[folder];
|
|
30
29
|
}
|
|
31
|
-
else if (
|
|
30
|
+
else if (config?.cds?.folders?.[folder]) {
|
|
32
31
|
customPath = config.cds.folders[folder];
|
|
33
32
|
}
|
|
34
33
|
if (customPath) {
|
|
@@ -36,7 +35,7 @@ function getCapFolderPathsSync(capProjectPath) {
|
|
|
36
35
|
}
|
|
37
36
|
}
|
|
38
37
|
}
|
|
39
|
-
catch
|
|
38
|
+
catch {
|
|
40
39
|
// Ignore errors as may have no custom paths or invalid configs
|
|
41
40
|
}
|
|
42
41
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/fiori-generator-shared",
|
|
3
3
|
"description": "Commonly used shared functionality and types to support the fiori generator.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -12,13 +12,14 @@
|
|
|
12
12
|
"files": [
|
|
13
13
|
"LICENSE",
|
|
14
14
|
"dist",
|
|
15
|
+
"templates",
|
|
15
16
|
"!dist/*.map",
|
|
16
17
|
"!dist/**/*.map"
|
|
17
18
|
],
|
|
18
19
|
"dependencies": {
|
|
19
20
|
"mem-fs": "2.1.0",
|
|
20
21
|
"mem-fs-editor": "9.4.0",
|
|
21
|
-
"@sap-ux/project-access": "1.
|
|
22
|
+
"@sap-ux/project-access": "1.23.0"
|
|
22
23
|
},
|
|
23
24
|
"devDependencies": {
|
|
24
25
|
"@types/mem-fs-editor": "7.0.1",
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
## Application Details
|
|
2
|
+
| |
|
|
3
|
+
| ------------- |
|
|
4
|
+
|**Generation Date and Time**<br><%= locals.generationDate %>|
|
|
5
|
+
|**App Generator**<br><%= generatorName %>|
|
|
6
|
+
|**App Generator Version**<br><%= generatorVersion %>|
|
|
7
|
+
|**Generation Platform**<br><%= locals.generatorPlatform %>|
|
|
8
|
+
|**Template Used**<br><%= template %>|
|
|
9
|
+
|**Service Type**<br><%= locals.serviceType %>|<% if(locals.metadataFilename) { %>
|
|
10
|
+
|**Metadata File**<br><%= locals.metadataFilename %>|<% } else { %>
|
|
11
|
+
|**Service URL**<br><%= locals.serviceUrl ? locals.serviceUrl : 'N/A' %>|<% } %>
|
|
12
|
+
|**Module Name**<br><%= appName %>|
|
|
13
|
+
|**Application Title**<br><%= appTitle %>|
|
|
14
|
+
|**Namespace**<br><%= appNamespace %>|
|
|
15
|
+
|**UI5 Theme**<br><%= ui5Theme %>|
|
|
16
|
+
|**UI5 Version**<br><%= ui5Version %>|
|
|
17
|
+
|**Enable Code Assist Libraries**<br><% if(locals.enableCodeAssist === true) { %><%= "True" %><% } else { %><%= "False" %><% }%>|
|
|
18
|
+
|**Enable TypeScript**<br><% if(locals.enableTypeScript === true) { %><%= "True" %><% } else { %><%= "False" %><% }%>|
|
|
19
|
+
|**Add Eslint configuration**<br><% if(locals.enableEslint === true) { %><%= "True, see https://www.npmjs.com/package/eslint-plugin-fiori-custom for the eslint rules." %><% } else { %><%= "False" %><% }%>|<% if (locals.additionalEntries) locals.additionalEntries.forEach(entry => { %>
|
|
20
|
+
|**<%= entry.label %>**<br><%= entry.value %>|<%})%>
|
|
21
|
+
|
|
22
|
+
## <%= appName %>
|
|
23
|
+
|
|
24
|
+
<%= appDescription %>
|
|
25
|
+
|
|
26
|
+
### Starting the generated app
|
|
27
|
+
|
|
28
|
+
- This app has been generated using the SAP Fiori tools - App Generator, as part of the SAP Fiori tools suite. <%= locals.launchText %><% if(locals.showMockDataInfo) {%>
|
|
29
|
+
|
|
30
|
+
- It is also possible to run the application using mock data that reflects the OData Service URL supplied during application generation. In order to run the application with Mock Data, run the following from the generated app root folder:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
npm run start-mock
|
|
34
|
+
```<%}%>
|
|
35
|
+
|
|
36
|
+
#### Pre-requisites:
|
|
37
|
+
|
|
38
|
+
1. Active NodeJS LTS (Long Term Support) version and associated supported NPM version. (See https://nodejs.org)
|
|
39
|
+
|
|
40
|
+
|