本文整理汇总了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"
}
}),
})
})