function jsonManifestParser(filePath, jsonFile, jsonData) {
    let icon;
    let icons;
    let data;
    try {
        manifest = fs_1.default.readFileSync(filePath + jsonFile);
        manifest = JSON.parse(manifest);
        jsonData = JSON.parse(jsonData);
        icons = jsonData.icons;
        for (icon of icons) {
            if (!manifest.hasOwnProperty('icons')) {
                manifest = Object.assign(Object.assign({}, manifest), { icons });
            }
            else if (!manifest.icons.some((micon) => micon.src === icon.src)) {
                manifest.icons.push(icon);
            }
            data = JSON.stringify(manifest, null, 2);
            fs_1.default.writeFileSync(filePath + 'manifest.json', data);
        }
    }
    catch (err) {
        console.error(err);
    }
}
/**
 * Description: Parses the manifest.json file and updates it with the newly generated icon references
 * @param path - path to the manifest.json file
 * @param jsonFile - name of the file (manifest.json)
 * @param jsonData - metadata extracted from the generated manifest.json file
 */
Parses the manifest.json file and updates it with the newly generated icon references
@param path - path to the manifest.json file
@param jsonFile - name of the file (manifest.json)
@param jsonData - metadata extracted from the generated manifest.json file
Parses the manifest . json file and updates it with the newly generated icon references @param path - path to the manifest . json file @param jsonFile - name of the file ( manifest . json ) @param jsonData - metadata extracted from the generated manifest . json file
function jsonManifestParser(filePath, jsonFile, jsonData) {
    let icon;
    let icons;
    let data;
    try {
        manifest = fs_1.default.readFileSync(filePath + jsonFile);
        manifest = JSON.parse(manifest);
        jsonData = JSON.parse(jsonData);
        icons = jsonData.icons;
        for (icon of icons) {
            if (!manifest.hasOwnProperty('icons')) {
                manifest = Object.assign(Object.assign({}, manifest), { icons });
            }
            else if (!manifest.icons.some((micon) => micon.src === icon.src)) {
                manifest.icons.push(icon);
            }
            data = JSON.stringify(manifest, null, 2);
            fs_1.default.writeFileSync(filePath + 'manifest.json', data);
        }
    }
    catch (err) {
        console.error(err);
    }
}
function jsonManifestParser ( filePath , jsonFile , jsonData ) { let icon ; let icons ; let data ; try { manifest = fs_1 . default . readFileSync ( filePath + jsonFile ) ; manifest = JSON . parse ( manifest ) ; jsonData = JSON . parse ( jsonData ) ; icons = jsonData . icons ; for ( icon of icons ) { if ( ! manifest . hasOwnProperty ( 'icons' ) ) { manifest = Object . assign ( Object . assign ( { } , manifest ) , { icons } ) ; } else if ( ! manifest . icons . some ( ( micon ) => micon . src === icon . src ) ) { manifest . icons . push ( icon ) ; } data = JSON . stringify ( manifest , null , 2 ) ; fs_1 . default . writeFileSync ( filePath + 'manifest.json' , data ) ; } } catch ( err ) { console . error ( err ) ; } }
Description: Parses the manifest.json file and updates it with the newly generated icon references
 @param path - path to the manifest.json file
 @param jsonFile - name of the file (manifest.json)
 @param jsonData - metadata extracted from the generated manifest.json file
Description : Parses the manifest . json file and updates it with the newly generated icon references @param path - path to the manifest . json file @param jsonFile - name of the file ( manifest . json ) @param jsonData - metadata extracted from the generated manifest . json file