@salesforce/templates 65.1.3 → 65.3.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/lib/generators/webApplicationGenerator.d.ts +10 -0
- package/lib/generators/webApplicationGenerator.js +80 -0
- package/lib/generators/webApplicationGenerator.js.map +1 -0
- package/lib/i18n/i18n.d.ts +1 -0
- package/lib/i18n/i18n.js +1 -0
- package/lib/i18n/i18n.js.map +1 -1
- package/lib/templates/reactBasic/index.html +12 -0
- package/lib/templates/reactBasic/package.json +32 -0
- package/lib/templates/reactBasic/postcss.config.js +7 -0
- package/lib/templates/reactBasic/src/App.tsx +25 -0
- package/lib/templates/reactBasic/src/components/Navigation.tsx +70 -0
- package/lib/templates/reactBasic/src/main.tsx +14 -0
- package/lib/templates/reactBasic/src/pages/About.tsx +13 -0
- package/lib/templates/reactBasic/src/pages/Home.tsx +15 -0
- package/lib/templates/reactBasic/src/pages/NotFound.tsx +21 -0
- package/lib/templates/reactBasic/src/routes.ts +20 -0
- package/lib/templates/reactBasic/src/styles/global.css +10 -0
- package/lib/templates/reactBasic/src/test-setup/setup.ts +10 -0
- package/lib/templates/reactBasic/src/vite-env.d.ts +2 -0
- package/lib/templates/reactBasic/tailwind.config.js +9 -0
- package/lib/templates/reactBasic/tsconfig.json +29 -0
- package/lib/templates/reactBasic/tsconfig.node.json +14 -0
- package/lib/templates/reactBasic/vite.config.ts +36 -0
- package/lib/templates/reactBasic/webapp.json +17 -0
- package/lib/templates/webapp-basic/_webapplication.webApplication-meta.xml +7 -0
- package/lib/templates/webapp-basic/index.html +11 -0
- package/lib/templates/webapp-basic/webapp.json +11 -0
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/utils/types.d.ts +10 -2
- package/lib/utils/types.js +3 -0
- package/lib/utils/types.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { WebApplicationOptions } from '../utils/types';
|
|
2
|
+
import { BaseGenerator } from './baseGenerator';
|
|
3
|
+
export default class WebApplicationGenerator extends BaseGenerator<WebApplicationOptions> {
|
|
4
|
+
constructor(options: WebApplicationOptions);
|
|
5
|
+
validateOptions(): void;
|
|
6
|
+
generate(): Promise<void>;
|
|
7
|
+
private generateSharedMetadata;
|
|
8
|
+
private generateWebAppBasic;
|
|
9
|
+
private generateReactBasic;
|
|
10
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
/*
|
|
5
|
+
* Copyright (c) 2025, salesforce.com, inc.
|
|
6
|
+
* All rights reserved.
|
|
7
|
+
* Licensed under the BSD 3-Clause license.
|
|
8
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
9
|
+
*/
|
|
10
|
+
const kit_1 = require("@salesforce/kit");
|
|
11
|
+
const path = require("path");
|
|
12
|
+
const i18n_1 = require("../i18n");
|
|
13
|
+
const utils_1 = require("../utils");
|
|
14
|
+
const baseGenerator_1 = require("./baseGenerator");
|
|
15
|
+
class WebApplicationGenerator extends baseGenerator_1.BaseGenerator {
|
|
16
|
+
constructor(options) {
|
|
17
|
+
super(options);
|
|
18
|
+
}
|
|
19
|
+
validateOptions() {
|
|
20
|
+
utils_1.CreateUtil.checkInputs(this.options.webappname);
|
|
21
|
+
utils_1.CreateUtil.checkInputs(this.options.template);
|
|
22
|
+
const fileparts = path.resolve(this.outputdir).split(path.sep);
|
|
23
|
+
if (!this.options.internal && !fileparts.includes('webApplications')) {
|
|
24
|
+
throw new Error(i18n_1.nls.localize('MissingWebApplicationsDir'));
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
generate() {
|
|
28
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
29
|
+
const { template, webappname } = this.options;
|
|
30
|
+
const masterLabel = this.options.masterlabel || (0, kit_1.camelCaseToTitleCase)(webappname);
|
|
31
|
+
const webappDir = path.join(this.outputdir, webappname);
|
|
32
|
+
yield this.generateSharedMetadata(webappDir, webappname, masterLabel);
|
|
33
|
+
switch (template) {
|
|
34
|
+
case 'reactBasic':
|
|
35
|
+
yield this.generateReactBasic(webappDir, webappname, masterLabel);
|
|
36
|
+
break;
|
|
37
|
+
default:
|
|
38
|
+
yield this.generateWebAppBasic(webappDir, masterLabel);
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
generateSharedMetadata(webappDir, webappname, masterLabel) {
|
|
43
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
44
|
+
this.sourceRootWithPartialPath('webapp-basic');
|
|
45
|
+
yield this.render(this.templatePath('_webapplication.webApplication-meta.xml'), this.destinationPath(path.join(webappDir, `${webappname}.webApplication-meta.xml`)), { apiVersion: this.apiversion, masterLabel });
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
generateWebAppBasic(webappDir, masterLabel) {
|
|
49
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
this.sourceRootWithPartialPath('webapp-basic');
|
|
51
|
+
yield this.render(this.templatePath('index.html'), this.destinationPath(path.join(webappDir, 'index.html')), { masterLabel });
|
|
52
|
+
yield this.render(this.templatePath('webapp.json'), this.destinationPath(path.join(webappDir, 'webapp.json')), {});
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
generateReactBasic(webappDir, webappname, masterLabel) {
|
|
56
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
57
|
+
this.sourceRootWithPartialPath('reactBasic');
|
|
58
|
+
yield this.render(this.templatePath('index.html'), this.destinationPath(path.join(webappDir, 'index.html')), { masterLabel });
|
|
59
|
+
yield this.render(this.templatePath('webapp.json'), this.destinationPath(path.join(webappDir, 'webapp.json')), {});
|
|
60
|
+
yield this.render(this.templatePath('package.json'), this.destinationPath(path.join(webappDir, 'package.json')), { webappname });
|
|
61
|
+
yield this.render(this.templatePath('vite.config.ts'), this.destinationPath(path.join(webappDir, 'vite.config.ts')), {});
|
|
62
|
+
yield this.render(this.templatePath('tsconfig.json'), this.destinationPath(path.join(webappDir, 'tsconfig.json')), {});
|
|
63
|
+
yield this.render(this.templatePath('tsconfig.node.json'), this.destinationPath(path.join(webappDir, 'tsconfig.node.json')), {});
|
|
64
|
+
yield this.render(this.templatePath('tailwind.config.js'), this.destinationPath(path.join(webappDir, 'tailwind.config.js')), {});
|
|
65
|
+
yield this.render(this.templatePath('postcss.config.js'), this.destinationPath(path.join(webappDir, 'postcss.config.js')), {});
|
|
66
|
+
yield this.render(this.templatePath(path.join('src', 'main.tsx')), this.destinationPath(path.join(webappDir, 'src', 'main.tsx')), {});
|
|
67
|
+
yield this.render(this.templatePath(path.join('src', 'App.tsx')), this.destinationPath(path.join(webappDir, 'src', 'App.tsx')), {});
|
|
68
|
+
yield this.render(this.templatePath(path.join('src', 'routes.ts')), this.destinationPath(path.join(webappDir, 'src', 'routes.ts')), {});
|
|
69
|
+
yield this.render(this.templatePath(path.join('src', 'vite-env.d.ts')), this.destinationPath(path.join(webappDir, 'src', 'vite-env.d.ts')), {});
|
|
70
|
+
yield this.render(this.templatePath(path.join('src', 'components', 'Navigation.tsx')), this.destinationPath(path.join(webappDir, 'src', 'components', 'Navigation.tsx')), {});
|
|
71
|
+
yield this.render(this.templatePath(path.join('src', 'pages', 'Home.tsx')), this.destinationPath(path.join(webappDir, 'src', 'pages', 'Home.tsx')), {});
|
|
72
|
+
yield this.render(this.templatePath(path.join('src', 'pages', 'About.tsx')), this.destinationPath(path.join(webappDir, 'src', 'pages', 'About.tsx')), {});
|
|
73
|
+
yield this.render(this.templatePath(path.join('src', 'pages', 'NotFound.tsx')), this.destinationPath(path.join(webappDir, 'src', 'pages', 'NotFound.tsx')), {});
|
|
74
|
+
yield this.render(this.templatePath(path.join('src', 'styles', 'global.css')), this.destinationPath(path.join(webappDir, 'src', 'styles', 'global.css')), {});
|
|
75
|
+
yield this.render(this.templatePath(path.join('src', 'test-setup', 'setup.ts')), this.destinationPath(path.join(webappDir, 'src', 'test-setup', 'setup.ts')), {});
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
exports.default = WebApplicationGenerator;
|
|
80
|
+
//# sourceMappingURL=webApplicationGenerator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webApplicationGenerator.js","sourceRoot":"","sources":["../../src/generators/webApplicationGenerator.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,yCAAuD;AACvD,6BAA6B;AAC7B,kCAA8B;AAC9B,oCAAsC;AAEtC,mDAAgD;AAEhD,MAAqB,uBAAwB,SAAQ,6BAAoC;IACvF,YAAY,OAA8B;QACxC,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAEM,eAAe;QACpB,kBAAU,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QAChD,kBAAU,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAE9C,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC/D,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,CAAC;YACrE,MAAM,IAAI,KAAK,CAAC,UAAG,CAAC,QAAQ,CAAC,2BAA2B,CAAC,CAAC,CAAC;QAC7D,CAAC;IACH,CAAC;IAEY,QAAQ;;YACnB,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC;YAC9C,MAAM,WAAW,GACf,IAAI,CAAC,OAAO,CAAC,WAAW,IAAI,IAAA,0BAAoB,EAAC,UAAU,CAAC,CAAC;YAC/D,MAAM,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AC,EAC3D,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC,EACzE,EAAE,CACH,CAAC;YAEF,MAAM,IAAI,CAAC,MAAM,CACf,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC,EAC7D,IAAI,CAAC,eAAe,CAClB,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE,UAAU,CAAC,CACtD,EACD,EAAE,CACH,CAAC;QACJ,CAAC;KAAA;CACF;AAlLD,0CAkLC"}
|
package/lib/i18n/i18n.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export declare const messages: {
|
|
|
17
17
|
MissingWaveTemplatesDir: string;
|
|
18
18
|
MissingAuraDir: string;
|
|
19
19
|
MissingLWCDir: string;
|
|
20
|
+
MissingWebApplicationsDir: string;
|
|
20
21
|
MissingLightningComponentTemplate: string;
|
|
21
22
|
localCustomTemplateDoNotExist: string;
|
|
22
23
|
customTemplatesShouldUseHttpsProtocol: string;
|
package/lib/i18n/i18n.js
CHANGED
|
@@ -26,6 +26,7 @@ exports.messages = {
|
|
|
26
26
|
MissingWaveTemplatesDir: "Analytics templates must have a parent folder named 'waveTemplates'.",
|
|
27
27
|
MissingAuraDir: "Lightning bundles must have a parent folder named 'aura'.",
|
|
28
28
|
MissingLWCDir: "Lightning bundles must have a parent folder named 'lwc'.",
|
|
29
|
+
MissingWebApplicationsDir: "Web applications must have a parent folder named 'webApplications'.",
|
|
29
30
|
MissingLightningComponentTemplate: 'Template %s not available for component type %s.',
|
|
30
31
|
localCustomTemplateDoNotExist: 'Local custom templates folder %s does not exist',
|
|
31
32
|
customTemplatesShouldUseHttpsProtocol: 'Only HTTPS protocol is supported for custom templates. Got %s.',
|
package/lib/i18n/i18n.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.js","sourceRoot":"","sources":["../../src/i18n/i18n.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH;;;;;;;;;GASG;AACU,QAAA,QAAQ,GAAG;IACtB,qBAAqB,EAAE,iDAAiD;IACxE,4BAA4B,EAAE,gCAAgC;IAC9D,sBAAsB,EAAE,oCAAoC;IAC5D,qBAAqB,EAAE,+CAA+C;IACtE,eAAe,EAAE,uDAAuD;IAExE,uBAAuB,EACrB,sEAAsE;IACxE,cAAc,EAAE,2DAA2D;IAC3E,aAAa,EAAE,0DAA0D;IACzE,iCAAiC,EAC/B,kDAAkD;IAEpD,6BAA6B,EAC3B,iDAAiD;IACnD,qCAAqC,EACnC,gEAAgE;IAClE,iCAAiC,EAC/B,iEAAiE;IACnE,6BAA6B,EAAE,6CAA6C;IAC5E,0CAA0C,EACxC,oEAAoE;IACtE,kBAAkB,EAAE,gCAAgC;IACpD,wBAAwB,EAAE,8BAA8B;IACxD,oBAAoB,EAAE,0BAA0B;IAChD,wBAAwB,EAAE,8BAA8B;IACxD,aAAa,EAAE,kBAAkB;IACjC,SAAS,EAAE,qBAAqB;IAChC,oBAAoB,EAAE,kCAAkC;CACzD,CAAC"}
|
|
1
|
+
{"version":3,"file":"i18n.js","sourceRoot":"","sources":["../../src/i18n/i18n.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH;;;;;;;;;GASG;AACU,QAAA,QAAQ,GAAG;IACtB,qBAAqB,EAAE,iDAAiD;IACxE,4BAA4B,EAAE,gCAAgC;IAC9D,sBAAsB,EAAE,oCAAoC;IAC5D,qBAAqB,EAAE,+CAA+C;IACtE,eAAe,EAAE,uDAAuD;IAExE,uBAAuB,EACrB,sEAAsE;IACxE,cAAc,EAAE,2DAA2D;IAC3E,aAAa,EAAE,0DAA0D;IACzE,yBAAyB,EACvB,qEAAqE;IACvE,iCAAiC,EAC/B,kDAAkD;IAEpD,6BAA6B,EAC3B,iDAAiD;IACnD,qCAAqC,EACnC,gEAAgE;IAClE,iCAAiC,EAC/B,iEAAiE;IACnE,6BAA6B,EAAE,6CAA6C;IAC5E,0CAA0C,EACxC,oEAAoE;IACtE,kBAAkB,EAAE,gCAAgC;IACpD,wBAAwB,EAAE,8BAA8B;IACxD,oBAAoB,EAAE,0BAA0B;IAChD,wBAAwB,EAAE,8BAA8B;IACxD,aAAa,EAAE,kBAAkB;IACjC,SAAS,EAAE,qBAAqB;IAChC,oBAAoB,EAAE,kCAAkC;CACzD,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title><%= masterLabel %></title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<div id="root"></div>
|
|
10
|
+
<script type="module" src="/src/main.tsx"></script>
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "<%= webappname %>",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite --mode development",
|
|
8
|
+
"build": "tsc && vite build",
|
|
9
|
+
"preview": "vite preview",
|
|
10
|
+
"lint": "eslint . --report-unused-disable-directives --max-warnings 0",
|
|
11
|
+
"test": "vitest run --passWithNoTests"
|
|
12
|
+
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"react": "^18.3.1",
|
|
15
|
+
"react-dom": "^18.3.1",
|
|
16
|
+
"react-router-dom": "^6.28.0"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"@types/react": "^18.3.12",
|
|
20
|
+
"@types/react-dom": "^18.3.1",
|
|
21
|
+
"@vitejs/plugin-react": "^4.3.3",
|
|
22
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
23
|
+
"@testing-library/react": "^16.1.0",
|
|
24
|
+
"autoprefixer": "^10.4.20",
|
|
25
|
+
"postcss": "^8.4.49",
|
|
26
|
+
"tailwindcss": "^3.4.17",
|
|
27
|
+
"typescript": "^5.2.2",
|
|
28
|
+
"vite": "^7.0.0",
|
|
29
|
+
"vitest": "^4.0.6"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Routes, Route } from 'react-router-dom';
|
|
2
|
+
import Navigation from './components/Navigation';
|
|
3
|
+
import { routes } from './routes';
|
|
4
|
+
|
|
5
|
+
function App() {
|
|
6
|
+
return (
|
|
7
|
+
<div className="min-h-screen flex flex-col">
|
|
8
|
+
<Navigation />
|
|
9
|
+
<main className="flex-1">
|
|
10
|
+
<Routes>
|
|
11
|
+
{routes.map(route => (
|
|
12
|
+
<Route
|
|
13
|
+
key={route.path}
|
|
14
|
+
path={route.path}
|
|
15
|
+
element={<route.component />}
|
|
16
|
+
/>
|
|
17
|
+
))}
|
|
18
|
+
</Routes>
|
|
19
|
+
</main>
|
|
20
|
+
</div>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export default App;
|
|
25
|
+
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { Link, useLocation } from 'react-router-dom';
|
|
3
|
+
import { navItems } from '../routes';
|
|
4
|
+
|
|
5
|
+
function Navigation() {
|
|
6
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
7
|
+
const location = useLocation();
|
|
8
|
+
|
|
9
|
+
const isActive = (path: string) => location.pathname === path;
|
|
10
|
+
|
|
11
|
+
const toggleMenu = () => setIsOpen(!isOpen);
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<nav className="bg-white border-b border-gray-200">
|
|
15
|
+
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
|
16
|
+
<div className="flex justify-between items-center h-16">
|
|
17
|
+
<Link to="/" className="text-xl font-semibold text-gray-900">
|
|
18
|
+
React App
|
|
19
|
+
</Link>
|
|
20
|
+
<button
|
|
21
|
+
onClick={toggleMenu}
|
|
22
|
+
className="p-2 rounded-md text-gray-700 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-blue-500"
|
|
23
|
+
aria-label="Toggle menu"
|
|
24
|
+
>
|
|
25
|
+
<div className="w-6 h-6 flex flex-col justify-center space-y-1.5">
|
|
26
|
+
<span
|
|
27
|
+
className={`block h-0.5 w-6 bg-current transition-all ${
|
|
28
|
+
isOpen ? 'rotate-45 translate-y-2' : ''
|
|
29
|
+
}`}
|
|
30
|
+
/>
|
|
31
|
+
<span
|
|
32
|
+
className={`block h-0.5 w-6 bg-current transition-all ${
|
|
33
|
+
isOpen ? 'opacity-0' : ''
|
|
34
|
+
}`}
|
|
35
|
+
/>
|
|
36
|
+
<span
|
|
37
|
+
className={`block h-0.5 w-6 bg-current transition-all ${
|
|
38
|
+
isOpen ? '-rotate-45 -translate-y-2' : ''
|
|
39
|
+
}`}
|
|
40
|
+
/>
|
|
41
|
+
</div>
|
|
42
|
+
</button>
|
|
43
|
+
</div>
|
|
44
|
+
{isOpen && (
|
|
45
|
+
<div className="pb-4">
|
|
46
|
+
<div className="flex flex-col space-y-2">
|
|
47
|
+
{navItems.map(item => (
|
|
48
|
+
<Link
|
|
49
|
+
key={item.path}
|
|
50
|
+
to={item.path}
|
|
51
|
+
onClick={() => setIsOpen(false)}
|
|
52
|
+
className={`px-3 py-2 rounded-md text-sm font-medium transition-colors ${
|
|
53
|
+
isActive(item.path)
|
|
54
|
+
? 'bg-blue-100 text-blue-700'
|
|
55
|
+
: 'text-gray-700 hover:bg-gray-100'
|
|
56
|
+
}`}
|
|
57
|
+
>
|
|
58
|
+
{item.label}
|
|
59
|
+
</Link>
|
|
60
|
+
))}
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
)}
|
|
64
|
+
</div>
|
|
65
|
+
</nav>
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export default Navigation;
|
|
70
|
+
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ReactDOM from 'react-dom/client';
|
|
3
|
+
import { BrowserRouter } from 'react-router-dom';
|
|
4
|
+
import App from './App';
|
|
5
|
+
import './styles/global.css';
|
|
6
|
+
|
|
7
|
+
ReactDOM.createRoot(document.getElementById('root')!).render(
|
|
8
|
+
<React.StrictMode>
|
|
9
|
+
<BrowserRouter>
|
|
10
|
+
<App />
|
|
11
|
+
</BrowserRouter>
|
|
12
|
+
</React.StrictMode>
|
|
13
|
+
);
|
|
14
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
function About() {
|
|
2
|
+
return (
|
|
3
|
+
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
|
|
4
|
+
<div className="text-center">
|
|
5
|
+
<h1 className="text-4xl font-bold text-gray-900 mb-4">About</h1>
|
|
6
|
+
<p className="text-lg text-gray-600">This is the about page.</p>
|
|
7
|
+
</div>
|
|
8
|
+
</div>
|
|
9
|
+
);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export default About;
|
|
13
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
function Home() {
|
|
2
|
+
return (
|
|
3
|
+
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
|
|
4
|
+
<div className="text-center">
|
|
5
|
+
<h1 className="text-4xl font-bold text-gray-900 mb-4">Home</h1>
|
|
6
|
+
<p className="text-lg text-gray-600 mb-8">
|
|
7
|
+
Welcome to your React application.
|
|
8
|
+
</p>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export default Home;
|
|
15
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Link } from 'react-router-dom';
|
|
2
|
+
|
|
3
|
+
function NotFound() {
|
|
4
|
+
return (
|
|
5
|
+
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
|
|
6
|
+
<div className="text-center">
|
|
7
|
+
<h1 className="text-4xl font-bold text-gray-900 mb-4">404</h1>
|
|
8
|
+
<p className="text-lg text-gray-600 mb-8">Page not found</p>
|
|
9
|
+
<Link
|
|
10
|
+
to="/"
|
|
11
|
+
className="inline-block px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors"
|
|
12
|
+
>
|
|
13
|
+
Go to Home
|
|
14
|
+
</Link>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export default NotFound;
|
|
21
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ComponentType } from 'react';
|
|
2
|
+
import Home from './pages/Home';
|
|
3
|
+
import About from './pages/About';
|
|
4
|
+
import NotFound from './pages/NotFound';
|
|
5
|
+
|
|
6
|
+
export interface RouteConfig {
|
|
7
|
+
path: string;
|
|
8
|
+
label: string;
|
|
9
|
+
component: ComponentType;
|
|
10
|
+
showInNav?: boolean;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const routes: RouteConfig[] = [
|
|
14
|
+
{ path: '/', label: 'Home', component: Home, showInNav: true },
|
|
15
|
+
{ path: '/about', label: 'About', component: About, showInNav: true },
|
|
16
|
+
{ path: '*', label: 'Not Found', component: NotFound, showInNav: false },
|
|
17
|
+
];
|
|
18
|
+
|
|
19
|
+
export const navItems = routes.filter(route => route.showInNav);
|
|
20
|
+
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"useDefineForClassFields": true,
|
|
5
|
+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
"moduleResolution": "bundler",
|
|
9
|
+
"allowImportingTsExtensions": true,
|
|
10
|
+
"resolveJsonModule": true,
|
|
11
|
+
"isolatedModules": true,
|
|
12
|
+
"noEmit": true,
|
|
13
|
+
"jsx": "react-jsx",
|
|
14
|
+
"strict": true,
|
|
15
|
+
"noUnusedLocals": true,
|
|
16
|
+
"noUnusedParameters": true,
|
|
17
|
+
"noFallthroughCasesInSwitch": true,
|
|
18
|
+
"baseUrl": ".",
|
|
19
|
+
"paths": {
|
|
20
|
+
"@/*": ["./src/*"],
|
|
21
|
+
"@components/*": ["./src/components/*"],
|
|
22
|
+
"@pages/*": ["./src/pages/*"],
|
|
23
|
+
"@styles/*": ["./src/styles/*"]
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"include": ["src"],
|
|
27
|
+
"references": [{ "path": "./tsconfig.node.json" }]
|
|
28
|
+
}
|
|
29
|
+
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"composite": true,
|
|
4
|
+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
|
5
|
+
"skipLibCheck": true,
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"moduleResolution": "bundler",
|
|
8
|
+
"allowSyntheticDefaultImports": true,
|
|
9
|
+
"strict": true,
|
|
10
|
+
"outDir": "./build"
|
|
11
|
+
},
|
|
12
|
+
"include": ["vite.config.ts"]
|
|
13
|
+
}
|
|
14
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { defineConfig } from 'vite';
|
|
2
|
+
import react from '@vitejs/plugin-react';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
import { resolve } from 'path';
|
|
5
|
+
|
|
6
|
+
export default defineConfig(() => {
|
|
7
|
+
return {
|
|
8
|
+
plugins: [react()],
|
|
9
|
+
base: '/',
|
|
10
|
+
|
|
11
|
+
resolve: {
|
|
12
|
+
alias: {
|
|
13
|
+
'@': path.resolve(__dirname, './src'),
|
|
14
|
+
'@components': path.resolve(__dirname, './src/components'),
|
|
15
|
+
'@pages': path.resolve(__dirname, './src/pages'),
|
|
16
|
+
'@styles': path.resolve(__dirname, './src/styles'),
|
|
17
|
+
},
|
|
18
|
+
extensions: ['.ts', '.tsx', '.js', '.jsx', '.json'],
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
build: {
|
|
22
|
+
outDir: resolve(__dirname, 'dist'),
|
|
23
|
+
assetsDir: 'assets',
|
|
24
|
+
sourcemap: false,
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
test: {
|
|
28
|
+
root: resolve(__dirname),
|
|
29
|
+
environment: 'happy-dom',
|
|
30
|
+
setupFiles: ['./src/test-setup/setup.ts'],
|
|
31
|
+
include: ['src/**/*.{test,spec}.{js,ts,jsx,tsx}'],
|
|
32
|
+
exclude: ['node_modules/', 'dist/'],
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
});
|
|
36
|
+
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"outputDir": "dist",
|
|
3
|
+
"scripts": {
|
|
4
|
+
"dev": "npm run dev",
|
|
5
|
+
"build": "npm run build",
|
|
6
|
+
"previewUrl": "http://localhost:3000"
|
|
7
|
+
},
|
|
8
|
+
"routing": {
|
|
9
|
+
"rewrites": [
|
|
10
|
+
{ "route": "/app/*", "rewrite": "pages/index.html" }
|
|
11
|
+
],
|
|
12
|
+
"redirects": [],
|
|
13
|
+
"fallback": "pages/index.html",
|
|
14
|
+
"trailingSlash": "auto",
|
|
15
|
+
"fileBasedRouting": true
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<WebApplication xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
3
|
+
<apiVersion><%= apiVersion %></apiVersion>
|
|
4
|
+
<masterLabel><%= masterLabel %></masterLabel>
|
|
5
|
+
<description>A Salesforce web application.</description>
|
|
6
|
+
<active>true</active>
|
|
7
|
+
</WebApplication>
|
package/lib/tsconfig.tsbuildinfo
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["../src/index.ts","../src/generators/analyticsTemplateGenerator.ts","../src/generators/apexClassGenerator.ts","../src/generators/apexTriggerGenerator.ts","../src/generators/baseGenerator.ts","../src/generators/lightningAppGenerator.ts","../src/generators/lightningComponentGenerator.ts","../src/generators/lightningEventGenerator.ts","../src/generators/lightningInterfaceGenerator.ts","../src/generators/lightningTestGenerator.ts","../src/generators/projectGenerator.ts","../src/generators/staticResourceGenerator.ts","../src/generators/visualforceComponentGenerator.ts","../src/generators/visualforcePageGenerator.ts","../src/i18n/i18n.ts","../src/i18n/index.ts","../src/i18n/localization.ts","../src/service/gitRepoUtils.ts","../src/service/templateService.ts","../src/utils/constants.ts","../src/utils/createUtil.ts","../src/utils/index.ts","../src/utils/types.ts"],"version":"5.9.3"}
|
|
1
|
+
{"root":["../src/index.ts","../src/generators/analyticsTemplateGenerator.ts","../src/generators/apexClassGenerator.ts","../src/generators/apexTriggerGenerator.ts","../src/generators/baseGenerator.ts","../src/generators/lightningAppGenerator.ts","../src/generators/lightningComponentGenerator.ts","../src/generators/lightningEventGenerator.ts","../src/generators/lightningInterfaceGenerator.ts","../src/generators/lightningTestGenerator.ts","../src/generators/projectGenerator.ts","../src/generators/staticResourceGenerator.ts","../src/generators/visualforceComponentGenerator.ts","../src/generators/visualforcePageGenerator.ts","../src/generators/webApplicationGenerator.ts","../src/i18n/i18n.ts","../src/i18n/index.ts","../src/i18n/localization.ts","../src/service/gitRepoUtils.ts","../src/service/templateService.ts","../src/utils/constants.ts","../src/utils/createUtil.ts","../src/utils/index.ts","../src/utils/types.ts"],"version":"5.9.3"}
|
package/lib/utils/types.d.ts
CHANGED
|
@@ -10,9 +10,10 @@ import ProjectGenerator from '../generators/projectGenerator';
|
|
|
10
10
|
import StaticResourceGenerator from '../generators/staticResourceGenerator';
|
|
11
11
|
import VisualforceComponentGenerator from '../generators/visualforceComponentGenerator';
|
|
12
12
|
import VisualforcePageGenerator from '../generators/visualforcePageGenerator';
|
|
13
|
+
import WebApplicationGenerator from '../generators/webApplicationGenerator';
|
|
13
14
|
import { BaseGenerator } from '../generators/baseGenerator';
|
|
14
15
|
export type GeneratorClass<TOptions extends TemplateOptions> = new (options: TOptions) => BaseGenerator<TOptions>;
|
|
15
|
-
export type Generators = typeof AnalyticsTemplateGenerator | typeof ApexClassGenerator | typeof ApexTriggerGenerator | typeof LightningAppGenerator | typeof LightningComponentGenerator | typeof LightningEventGenerator | typeof LightningTestGenerator | typeof LightningInterfaceGenerator | typeof ProjectGenerator | typeof StaticResourceGenerator | typeof VisualforceComponentGenerator | typeof VisualforcePageGenerator;
|
|
16
|
+
export type Generators = typeof AnalyticsTemplateGenerator | typeof ApexClassGenerator | typeof ApexTriggerGenerator | typeof LightningAppGenerator | typeof LightningComponentGenerator | typeof LightningEventGenerator | typeof LightningTestGenerator | typeof LightningInterfaceGenerator | typeof ProjectGenerator | typeof StaticResourceGenerator | typeof VisualforceComponentGenerator | typeof VisualforcePageGenerator | typeof WebApplicationGenerator;
|
|
16
17
|
/**
|
|
17
18
|
* Available Template types
|
|
18
19
|
* Each template type must have a corresponding generator class:
|
|
@@ -32,7 +33,8 @@ export declare enum TemplateType {
|
|
|
32
33
|
Project = 8,
|
|
33
34
|
VisualforceComponent = 9,
|
|
34
35
|
VisualforcePage = 10,
|
|
35
|
-
StaticResource = 11
|
|
36
|
+
StaticResource = 11,
|
|
37
|
+
WebApplication = 12
|
|
36
38
|
}
|
|
37
39
|
export declare const generators: Map<TemplateType, GeneratorClass<any>>;
|
|
38
40
|
export type CreateOutput = {
|
|
@@ -115,4 +117,10 @@ export interface StaticResourceOptions extends TemplateOptions {
|
|
|
115
117
|
contenttype: string;
|
|
116
118
|
template: 'empty';
|
|
117
119
|
}
|
|
120
|
+
export interface WebApplicationOptions extends TemplateOptions {
|
|
121
|
+
webappname: string;
|
|
122
|
+
template: 'default' | 'reactBasic';
|
|
123
|
+
masterlabel?: string;
|
|
124
|
+
internal?: boolean;
|
|
125
|
+
}
|
|
118
126
|
export {};
|
package/lib/utils/types.js
CHANGED
|
@@ -19,6 +19,7 @@ const projectGenerator_1 = require("../generators/projectGenerator");
|
|
|
19
19
|
const staticResourceGenerator_1 = require("../generators/staticResourceGenerator");
|
|
20
20
|
const visualforceComponentGenerator_1 = require("../generators/visualforceComponentGenerator");
|
|
21
21
|
const visualforcePageGenerator_1 = require("../generators/visualforcePageGenerator");
|
|
22
|
+
const webApplicationGenerator_1 = require("../generators/webApplicationGenerator");
|
|
22
23
|
/**
|
|
23
24
|
* Available Template types
|
|
24
25
|
* Each template type must have a corresponding generator class:
|
|
@@ -40,6 +41,7 @@ var TemplateType;
|
|
|
40
41
|
TemplateType[TemplateType["VisualforceComponent"] = 9] = "VisualforceComponent";
|
|
41
42
|
TemplateType[TemplateType["VisualforcePage"] = 10] = "VisualforcePage";
|
|
42
43
|
TemplateType[TemplateType["StaticResource"] = 11] = "StaticResource";
|
|
44
|
+
TemplateType[TemplateType["WebApplication"] = 12] = "WebApplication";
|
|
43
45
|
})(TemplateType || (exports.TemplateType = TemplateType = {}));
|
|
44
46
|
exports.generators = new Map([
|
|
45
47
|
[TemplateType.AnalyticsTemplate, analyticsTemplateGenerator_1.default],
|
|
@@ -54,5 +56,6 @@ exports.generators = new Map([
|
|
|
54
56
|
[TemplateType.StaticResource, staticResourceGenerator_1.default],
|
|
55
57
|
[TemplateType.VisualforceComponent, visualforceComponentGenerator_1.default],
|
|
56
58
|
[TemplateType.VisualforcePage, visualforcePageGenerator_1.default],
|
|
59
|
+
[TemplateType.WebApplication, webApplicationGenerator_1.default],
|
|
57
60
|
]);
|
|
58
61
|
//# sourceMappingURL=types.js.map
|
package/lib/utils/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/utils/types.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,yFAAkF;AAClF,yEAAkE;AAClE,6EAAsE;AACtE,+EAAwE;AACxE,2FAAoF;AACpF,mFAA4E;AAC5E,2FAAoF;AACpF,iFAA0E;AAC1E,qEAA8D;AAC9D,mFAA4E;AAC5E,+FAAwF;AACxF,qFAA8E;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/utils/types.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,yFAAkF;AAClF,yEAAkE;AAClE,6EAAsE;AACtE,+EAAwE;AACxE,2FAAoF;AACpF,mFAA4E;AAC5E,2FAAoF;AACpF,iFAA0E;AAC1E,qEAA8D;AAC9D,mFAA4E;AAC5E,+FAAwF;AACxF,qFAA8E;AAC9E,mFAA4E;AAsB5E;;;;;;GAMG;AACH,IAAY,YAcX;AAdD,WAAY,YAAY;IACtB,yEAAiB,CAAA;IACjB,yDAAS,CAAA;IACT,6DAAW,CAAA;IACX,+DAAY,CAAA;IACZ,2EAAkB,CAAA;IAClB,mEAAc,CAAA;IACd,2EAAkB,CAAA;IAClB,iEAAa,CAAA;IACb,qDAAO,CAAA;IACP,+EAAoB,CAAA;IACpB,sEAAe,CAAA;IACf,oEAAc,CAAA;IACd,oEAAc,CAAA;AAChB,CAAC,EAdW,YAAY,4BAAZ,YAAY,QAcvB;AAEY,QAAA,UAAU,GAAG,IAAI,GAAG,CAAoC;IACnE,CAAC,YAAY,CAAC,iBAAiB,EAAE,oCAA0B,CAAC;IAC5D,CAAC,YAAY,CAAC,SAAS,EAAE,4BAAkB,CAAC;IAC5C,CAAC,YAAY,CAAC,WAAW,EAAE,8BAAoB,CAAC;IAChD,CAAC,YAAY,CAAC,YAAY,EAAE,+BAAqB,CAAC;IAClD,CAAC,YAAY,CAAC,kBAAkB,EAAE,qCAA2B,CAAC;IAC9D,CAAC,YAAY,CAAC,cAAc,EAAE,iCAAuB,CAAC;IACtD,CAAC,YAAY,CAAC,kBAAkB,EAAE,qCAA2B,CAAC;IAC9D,CAAC,YAAY,CAAC,aAAa,EAAE,gCAAsB,CAAC;IACpD,CAAC,YAAY,CAAC,OAAO,EAAE,0BAAgB,CAAC;IACxC,CAAC,YAAY,CAAC,cAAc,EAAE,iCAAuB,CAAC;IACtD,CAAC,YAAY,CAAC,oBAAoB,EAAE,uCAA6B,CAAC;IAClE,CAAC,YAAY,CAAC,eAAe,EAAE,kCAAwB,CAAC;IACxD,CAAC,YAAY,CAAC,cAAc,EAAE,iCAAuB,CAAC;CACvD,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/templates",
|
|
3
|
-
"version": "65.
|
|
3
|
+
"version": "65.3.0",
|
|
4
4
|
"description": "Salesforce JS library for templates",
|
|
5
5
|
"bugs": "https://github.com/forcedotcom/salesforcedx-templates/issues",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"chai-as-promised": "^7.1.2",
|
|
36
36
|
"commitizen": "^4.3.1",
|
|
37
37
|
"cz-conventional-changelog": "^3.3.0",
|
|
38
|
-
"esbuild": "^0.27.
|
|
38
|
+
"esbuild": "^0.27.1",
|
|
39
39
|
"eslint": "^7.27.0",
|
|
40
40
|
"eslint-config-prettier": "^6.11.0",
|
|
41
41
|
"eslint-config-salesforce": "^0.1.6",
|