Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions convertToSingleHost.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ async function modifyProjectForSingleHost(host) {
if (manifestType === "xml" && targetHosts.length > 1) {
throw new Error(`Multiple hosts are not supported for ${manifestType} manifest.`);
}
if (!commandsSupportedHosts.includes(host)) {
throw new Error(`'${host}' does not support commands.`);
}

await convertProjectToSingleHost(host, manifestType);

Expand Down Expand Up @@ -120,8 +117,14 @@ async function convertProjectToSingleHost(host, manifestType) {
}
}

// Write final code files
await writeFileAsync(taskpaneFilePath, taskpaneContent);
await writeFileAsync(commandsFilePath, commandsContent);
if (commandsSupportedHosts.includes(host)) {
await writeFileAsync(commandsFilePath, commandsContent);
} else {
deleteFolder(path.resolve(`./src/commands`));
}

// Delete test folder
deleteFolder(path.resolve(`./test`));

Expand Down