Skip to content

Commit 09a6e40

Browse files
committed
review changes
1 parent abd332b commit 09a6e40

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed
Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
/* global require, process, console */
22

3-
import fs from "fs";
3+
const fs = require("fs");
4+
const path = require("path");
5+
const util = require("util");
6+
const manifest = require("office-addin-manifest");
7+
48
const host = process.argv[2];
59
const manifestType = process.argv[3];
610
const projectName = process.argv[4];
7-
const appId = process.argv[5];
11+
let appId = process.argv[5];
812
const hosts = ["excel", "onenote", "outlook", "powerpoint", "project", "word"];
9-
import path from "path" ;
10-
import util from "util";
11-
import { OfficeAddinManifest } from "office-addin-manifest";
1213
const testPackages = [
1314
"@types/mocha",
1415
"@types/node",
@@ -135,7 +136,7 @@ async function deleteSupportFiles() {
135136
await unlinkFileAsync("LICENSE");
136137
await unlinkFileAsync("README.md");
137138
await unlinkFileAsync("SECURITY.md");
138-
await unlinkFileAsync("./convertToSingleHost.mjs");
139+
await unlinkFileAsync("./convertToSingleHost.js");
139140
await unlinkFileAsync(".npmrc");
140141
await unlinkFileAsync("package-lock.json");
141142
}
@@ -260,6 +261,9 @@ if ((host !== "outlook") || (manifestType !== "json")) {
260261
};
261262

262263
if (projectName) {
263-
OfficeAddinManifest.modifyManifestFile(manifestPath, projectName, appId);
264+
if (!appId) {
265+
appId = "random";
266+
}
267+
manifest.OfficeAddinManifest.modifyManifestFile(manifestPath, appId, projectName);
264268
}
265269

0 commit comments

Comments
 (0)