Skip to content

Commit 89d0a4b

Browse files
authored
Fix descriptions for new project templates (#14694)
## Description This PR updates the descriptions for the new project templates to be more user-friendly and informative. ### Type of Change - Bug fix (non-breaking change which fixes an issue) ### Why As we are in the process of deprecating and/or changing the defaults for templates, I want to make sure we have clear consistent documentation of what each template looks like. ### What Updated the descriptions and removed the wrapper code that allowed for the (now removed) old lib templates. ## Screenshots ![image](https://github.com/user-attachments/assets/92daaef4-a8a3-4d50-82df-63c94487d26b) ## Testing Verified `init-windows --list` works. ## Changelog Should this change be included in the release notes: _yes_ Fix descriptions for new project templates
1 parent 42dad98 commit 89d0a4b

File tree

6 files changed

+20
-27
lines changed

6 files changed

+20
-27
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "prerelease",
3+
"comment": "Fix descriptions for new project templates",
4+
"packageName": "react-native-windows",
5+
"email": "jthysell@microsoft.com",
6+
"dependentChangeType": "patch"
7+
}

vnext/templates/cpp-app/template.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,9 @@ async function postInstall(config = {}, options = {}) {
142142
}
143143

144144
module.exports = {
145-
name: 'React Native Windows Application (New Arch, C++, Win32, Hermes)',
145+
name: 'React Native Windows Application (New Arch, WinAppSDK, C++)',
146146
description:
147-
"[Experimental] A RNW app targeting RN's new architecture, with the Hermes JS engine.",
147+
"[Preview] A RNW app using RN's New Architecture, built in C++ and targeting WinAppSDK.",
148148
preInstall,
149149
getFileMappings,
150150
postInstall,

vnext/templates/cpp-lib/template.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ async function postInstall(config = {}, options = {}) {
244244
module.exports = {
245245
name: 'React Native Windows Library (C++)',
246246
description:
247-
"A RNW native/turbo module supporting both RN's old and new architecture.",
247+
"A RNW (Turbo) Native Module supporting RN's New and Old Architectures built in C++.",
248248
preInstall,
249249
getFileMappings,
250250
postInstall,

vnext/templates/old/generateWrapper.js

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,13 @@
99
const generateWindows = require('../../generate');
1010
const templateUtils = require('../templateUtils');
1111

12-
function makeGenerateWindowsWrapper(
13-
language = 'cpp',
14-
projectType = 'app',
15-
isDefault = false,
16-
) {
17-
const name =
18-
projectType === 'lib'
19-
? `React Native Windows Library (Old Arch, UWP, ${
20-
language === 'cs' ? 'C#' : 'C++'
21-
})`
22-
: `React Native Windows Application (Old Arch, UWP, ${
23-
language === 'cs' ? 'C#' : 'C++'
24-
}, Hermes)`;
25-
const description =
26-
projectType === 'lib'
27-
? `A RNW module written in ${
28-
language === 'cs' ? 'C#' : 'C++'
29-
}, targeting UWP and RN's old architecture.`
30-
: `A RNW app written in ${
31-
language === 'cs' ? 'C#' : 'C++'
32-
}, targeting UWP and RN's old architecture, with the Hermes JS engine.`;
12+
function makeGenerateWindowsWrapper(language = 'cpp', isDefault = false) {
13+
const name = `React Native Windows Application (Old Arch, UWP, ${
14+
language === 'cs' ? 'C#' : 'C++'
15+
})`;
16+
const description = `A RNW app using RN's Old Architecture, built in ${
17+
language === 'cs' ? 'C#' : 'C++'
18+
} and targeting UWP.`;
3319

3420
const postInstall = async (config = {}, options = {}) => {
3521
const experimentalFeatures = config?.project?.windows?.experimentalFeatures;
@@ -39,7 +25,7 @@ function makeGenerateWindowsWrapper(
3925
const generateOptions = {
4026
overwrite: !!options.overwrite,
4127
language,
42-
projectType,
28+
projectType: 'app',
4329
experimentalNuGetDependency:
4430
experimentalFeatures?.UseExperimentalNuget === 'true' ?? false,
4531
useWinUI3: experimentalFeatures?.UseWinUI3 === 'true' ?? false,

vnext/templates/old/uwp-cpp-app/template.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212

1313
const {makeGenerateWindowsWrapper} = require('../generateWrapper');
1414

15-
module.exports = makeGenerateWindowsWrapper('cpp', 'app', true); // TODO: Remove this as the default
15+
module.exports = makeGenerateWindowsWrapper('cpp', true); // TODO: Remove this as the default

vnext/templates/old/uwp-cs-app/template.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212

1313
const {makeGenerateWindowsWrapper} = require('../generateWrapper');
1414

15-
module.exports = makeGenerateWindowsWrapper('cs', 'app');
15+
module.exports = makeGenerateWindowsWrapper('cs');

0 commit comments

Comments
 (0)