本文整理汇总了TypeScript中out.Platform.LINUX类的典型用法代码示例。如果您正苦于以下问题:TypeScript Platform.LINUX类的具体用法?TypeScript Platform.LINUX怎么用?TypeScript Platform.LINUX使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Platform.LINUX类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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"
}
}),
})
})
示例6: app
import test from "./helpers/avaEx"
import { modifyPackageJson, app, appThrows } from "./helpers/packTester"
import { remove } from "fs-extra-p"
import * as path from "path"
import { Platform } from "out"
import { Arch } from "out/metadata"
test.ifNotWindows("deb", app({targets: Platform.LINUX.createTarget("deb")}))
test.ifNotWindows("arm deb", app({targets: Platform.LINUX.createTarget("deb", Arch.armv7l)}))
test.ifDevOrLinuxCi("AppImage", app({targets: Platform.LINUX.createTarget()}))
test.ifDevOrLinuxCi("AppImage - default icon", app({
targets: Platform.LINUX.createTarget("appimage"),
devMetadata: {
build: {
linux: {
executableName: "foo",
}
}
}
}, {
projectDirCreated: projectDir => remove(path.join(projectDir, "build"))
}))
// "apk" is very slow, don't test for now
test.ifDevOrLinuxCi("targets", app({targets: Platform.LINUX.createTarget(["sh", "freebsd", "pacman", "zip", "7z"])}))
test.ifDevOrLinuxCi("tar", app({targets: Platform.LINUX.createTarget(["tar.xz", "tar.lz", "tar.bz2"])}))
示例7: app
import { modifyPackageJson, app, appThrows } from "../helpers/packTester"
import { remove, readFile } from "fs-extra-p"
import * as path from "path"
import { Platform } from "out"
test.ifDevOrLinuxCi("AppImage", app({targets: Platform.LINUX.createTarget()}))
// test.ifNotCi("snap", app({targets: Platform.LINUX.createTarget("snap")}))
test.ifDevOrLinuxCi("AppImage - default icon, custom executable and custom desktop", app({
targets: Platform.LINUX.createTarget("appimage"),
effectiveOptionComputed: async (it) => {
const content = await readFile(it[1], "utf-8")
expect (content.includes("Foo=bar")).toBeTruthy()
expect (content.includes("Terminal=true")).toBeTruthy()
return false
},
config: {
linux: {
executableName: "foo",
desktop: {
Foo: "bar",
Terminal: "true",
},
}
}
}, {
projectDirCreated: it => remove(path.join(it, "build")),
}))
test.ifNotWindows("icons from ICNS", app({targets: Platform.LINUX.createTarget()}, {
示例8: app
import { Platform, Arch } from "out"
import { app } from "../helpers/packTester"
test.ifNotWindows("deb", app({targets: Platform.LINUX.createTarget("deb")}))
test.ifNotWindows("arm deb", app({targets: Platform.LINUX.createTarget("deb", Arch.armv7l)}))
test.ifNotWindows("custom depends", app({
targets: Platform.LINUX.createTarget("deb"),
config: {
deb: {
depends: ["foo"],
}
}
},
{
expectedDepends: "foo"
}))
示例9: app
import { Platform } from "out"
import { app } from "../helpers/packTester"
test.ifDevOrLinuxCi("tar", app({targets: Platform.LINUX.createTarget(["tar.xz", "tar.lz", "tar.bz2"])}))
示例10: app
// "apk" is very slow, don't test for now
import { Platform } from "out"
import { app } from "../helpers/packTester"
test.ifDevOrLinuxCi("targets", app({targets: Platform.LINUX.createTarget(["sh", "freebsd", "pacman", "zip", "7z"])}))
// https://github.com/electron-userland/electron-builder/issues/460
// for some reasons in parallel to fmp we cannot use tar
test.ifDevOrLinuxCi("rpm and tar.gz", app({targets: Platform.LINUX.createTarget(["rpm", "tar.gz"])}))
示例11: app
import { outputFile, symlink } from "fs-extra-p"
import { assertPack, modifyPackageJson, app } from "./helpers/packTester"
import BluebirdPromise from "bluebird-lst-c"
import * as path from "path"
import { assertThat } from "./helpers/fileAssert"
import { Platform, DIR_TARGET } from "out"
import { statFile } from "asar-electron-builder"
test.ifDevOrLinuxCi("unpackDir one", app({
targets: Platform.LINUX.createTarget(DIR_TARGET),
config: {
asarUnpack: ["assets", "b2"],
}
}, {
projectDirCreated: projectDir => {
return BluebirdPromise.all([
outputFile(path.join(projectDir, "assets", "file"), "data"),
outputFile(path.join(projectDir, "b2", "file"), "data"),
])
},
packed: context => {
return BluebirdPromise.all([
assertThat(path.join(context.getResources(Platform.LINUX), "app.asar.unpacked", "assets")).isDirectory(),
assertThat(path.join(context.getResources(Platform.LINUX), "app.asar.unpacked", "b2")).isDirectory(),
])
},
}))
test.ifDevOrLinuxCi("unpackDir", () => {
return assertPack("test-app", {
targets: Platform.LINUX.createTarget(DIR_TARGET),
示例12: assertPack
test.ifDevOrLinuxCi("AppImage - default icon", () => assertPack("test-app-one", {
targets: Platform.LINUX.createTarget("appimage"),
}, {
tempDirCreated: projectDir => remove(path.join(projectDir, "build"))
},
))