本文整理匯總了TypeScript中out.Platform.OSX類的典型用法代碼示例。如果您正苦於以下問題:TypeScript Platform.OSX類的具體用法?TypeScript Platform.OSX怎麽用?TypeScript Platform.OSX使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了Platform.OSX類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: assertPack
test.ifOsx("custom mas", () => {
let platformPackager: CheckingOsXPackager = null
return assertPack("test-app-one", signed({
targets: Platform.OSX.createTarget(),
platformPackagerFactory: (packager, platform, cleanupTasks) => platformPackager = new CheckingOsXPackager(packager, cleanupTasks),
devMetadata: {
build: {
osx: {
target: ["mas"],
identity: "Test Test",
},
mas: {
entitlements: "mas-entitlements file path",
entitlementsInherit: "mas-entitlementsInherit file path",
}
}
}
}), {
packed: () => {
assertThat(platformPackager.effectiveSignOptions).has.properties({
identity: "Test Test",
entitlements: "mas-entitlements file path",
"entitlements-inherit": "mas-entitlementsInherit file path",
})
return BluebirdPromise.resolve(null)
}
})
})
示例2: createTargetTest
function createTargetTest(target: Array<string>, expectedContents: Array<string>) {
let options: PackagerOptions = {
targets: Platform.OSX.createTarget(),
devMetadata: {
build: {
osx: {
target: target
}
}
}
}
if (target.includes("mas")) {
options = signed(options)
}
return () => assertPack("test-app-one", options, {
expectedContents: expectedContents
})
}