本文整理匯總了TypeScript中out.Platform.LINUX.createTarget方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript Platform.LINUX.createTarget方法的具體用法?TypeScript Platform.LINUX.createTarget怎麽用?TypeScript Platform.LINUX.createTarget使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類out.Platform.LINUX
的用法示例。
在下文中一共展示了Platform.LINUX.createTarget方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: assertPack
test.ifNotCiOsx("ignore node_modules known dev dep", () => {
const build: any = {
asar: false,
ignore: (file: string) => {
return file === "/ignoreMe"
}
}
return assertPack("test-app-one", {
targets: Platform.LINUX.createTarget(DIR_TARGET),
devMetadata: {
build: build
}
}, {
tempDirCreated: projectDir => {
return BluebirdPromise.all([
modifyPackageJson(projectDir, data => {
data.devDependencies = Object.assign({
"electron-osx-sign": "*",
}, data.devDependencies)
}),
outputFile(path.join(projectDir, "node_modules", "electron-osx-sign", "package.json"), "{}"),
outputFile(path.join(projectDir, "ignoreMe"), ""),
])
},
packed: projectDir => {
return BluebirdPromise.all([
assertThat(path.join(projectDir, outDirName, "linux", "resources", "app", "node_modules", "electron-osx-sign")).doesNotExist(),
assertThat(path.join(projectDir, outDirName, "linux", "resources", "app", "ignoreMe")).doesNotExist(),
])
},
})
})
示例2: assertPack
test.ifDevOrLinuxCi("rpm and tar.gz", () => assertPack("test-app-one", {
targets: Platform.LINUX.createTarget(),
devMetadata: {
build: {
linux: {
target: ["rpm", "tar.gz"],
}
}
}
}))
示例3: assertPack
test.ifDevOrLinuxCi("tar", () => assertPack("test-app-one", {
targets: Platform.LINUX.createTarget(),
devMetadata: {
build: {
linux: {
// "apk" is very slow, don't test for now
target: ["tar.xz", "tar.lz", "tar.gz", "tar.bz2"],
}
}
}
}))
示例4: assertPack
test.ifNotWindows("custom depends", () => assertPack("test-app-one", {
targets: Platform.LINUX.createTarget("deb"),
devMetadata: {
build: {
deb: {
depends: ["foo"],
}
}
}
},
{
expectedDepends: "foo"
}))
示例5: assertPack
test.ifDevOrLinuxCi("failed peer dep", () => {
return assertPack("test-app-one", {
targets: Platform.LINUX.createTarget(DIR_TARGET),
}, {
npmInstallBefore: true,
projectDirCreated: projectDir => modifyPackageJson(projectDir, data => {
//noinspection SpellCheckingInspection
data.dependencies = {
"rc-datepicker": "4.0.0",
"react": "15.2.1",
"react-dom": "15.2.1"
}
}),
})
})