How to use the office-addin-manifest.modifyManifestFile function in office-addin-manifest

To help you get started, we’ve selected a few office-addin-manifest examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github OfficeDev / Office-Add-in-NodeJS-SSO / SSOAutoSetup / src / configure / configure.js View on Github external
async function updateProjectManifest(applicationId) {
    console.log('Updating manifest with application ID');
    try {
        // Update manifest with application guid and unique manifest id
        const manifestContent = await fs.readFileSync(defaults.manifestPath, 'utf8');
        const re = new RegExp('{application GUID here}', 'g');
        const updatedManifestContent = manifestContent.replace(re, applicationId);
        await fs.writeFileSync(defaults.manifestPath, updatedManifestContent);
        await manifest.modifyManifestFile(defaults.manifestPath, 'random');

    } catch (err) {
        throw new Error(`Unable to update ${defaults.manifestPath}. \n${err}`);
    }
}

office-addin-manifest

Read and modify Office Add-in manifest files.

MIT
Latest version published 4 days ago

Package Health Score

83 / 100
Full package analysis