Add ImageRun feature
This commit is contained in:
16
src/patcher/content-types-manager.ts
Normal file
16
src/patcher/content-types-manager.ts
Normal file
@ -0,0 +1,16 @@
|
||||
import { Element } from "xml-js";
|
||||
|
||||
import { getFirstLevelElements } from "./util";
|
||||
|
||||
export const appendContentType = (element: Element, contentType: string, extension: string): void => {
|
||||
const relationshipElements = getFirstLevelElements(element, "Types");
|
||||
// eslint-disable-next-line functional/immutable-data
|
||||
relationshipElements.push({
|
||||
attributes: {
|
||||
ContentType: contentType,
|
||||
Extension: extension,
|
||||
},
|
||||
name: "Default",
|
||||
type: "element",
|
||||
});
|
||||
};
|
Reference in New Issue
Block a user