office-addin-project
Advanced tools
Comparing version 0.3.3 to 0.3.4
@@ -123,2 +123,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
return __awaiter(this, void 0, void 0, function* () { | ||
yield updatePackageJson(); | ||
yield updateWebpackConfig(); | ||
}); | ||
} | ||
function updatePackageJson() { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const packageJson = `./package.json`; | ||
@@ -137,2 +143,14 @@ const readFileAsync = util.promisify(fs.readFile); | ||
} | ||
function updateWebpackConfig() { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const weppackConfig = `./webpack.config.js`; | ||
const readFileAsync = util.promisify(fs.readFile); | ||
const data = yield readFileAsync(weppackConfig, "utf8"); | ||
// switching to json extension is the easy fix. | ||
// TODO: update to remove the manifest copy plugin since it's not needed in webpack | ||
let content = data.replace(/"(manifest\*\.)xml"/gi, "\"$1json\""); | ||
const writeFileAsync = util.promisify(fs.writeFile); | ||
yield writeFileAsync(weppackConfig, content); | ||
}); | ||
} | ||
//# sourceMappingURL=convert.js.map |
{ | ||
"name": "office-addin-project", | ||
"version": "0.3.3", | ||
"version": "0.3.4", | ||
"description": "Provides project wide commands to an Office Addin Project", | ||
@@ -57,3 +57,3 @@ "main": "./lib/main.js", | ||
"license": "MIT", | ||
"gitHead": "e9cd6b6456c7b79621e5d4c07206e6cc1ab47df9" | ||
"gitHead": "e674873ab01619b9e0ea7d3cc4bffb44d811d558" | ||
} |
@@ -121,2 +121,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
async function updateManifestXmlReferences(): Promise<void> { | ||
await updatePackageJson(); | ||
await updateWebpackConfig(); | ||
} | ||
async function updatePackageJson(): Promise<void> { | ||
const packageJson = `./package.json`; | ||
@@ -134,2 +139,3 @@ const readFileAsync = util.promisify(fs.readFile); | ||
}); | ||
// write updated json to file | ||
@@ -139,1 +145,14 @@ const writeFileAsync = util.promisify(fs.writeFile); | ||
} | ||
async function updateWebpackConfig(): Promise<void> { | ||
const weppackConfig = `./webpack.config.js`; | ||
const readFileAsync = util.promisify(fs.readFile); | ||
const data = await readFileAsync(weppackConfig, "utf8"); | ||
// switching to json extension is the easy fix. | ||
// TODO: update to remove the manifest copy plugin since it's not needed in webpack | ||
let content = data.replace(/"(manifest\*\.)xml"/gi, "\"$1json\""); | ||
const writeFileAsync = util.promisify(fs.writeFile); | ||
await writeFileAsync(weppackConfig, content); | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
117271
1181