當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript out.Platform.LINUX類代碼示例

本文整理匯總了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(),
      ])
    },
  })
})
開發者ID:FromStoneage,項目名稱:electron-builder,代碼行數:33,代碼來源:globTest.ts

示例2: assertPack

test.ifDevOrLinuxCi("rpm and tar.gz", () => assertPack("test-app-one", {
  targets: Platform.LINUX.createTarget(),
  devMetadata: {
    build: {
      linux: {
        target: ["rpm", "tar.gz"],
      }
    }
  }
}))
開發者ID:FromStoneage,項目名稱:electron-builder,代碼行數:10,代碼來源:linuxPackagerTest.ts

示例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"],
      }
    }
  }
}))
開發者ID:lcpo,項目名稱:electron-builder,代碼行數:11,代碼來源:linuxPackagerTest.ts

示例4: assertPack

test.ifNotWindows("custom depends", () => assertPack("test-app-one", {
    targets: Platform.LINUX.createTarget("deb"),
    devMetadata: {
      build: {
        deb: {
          depends: ["foo"],
        }
      }
    }
  },
  {
    expectedDepends: "foo"
  }))
開發者ID:amilajack,項目名稱:electron-builder,代碼行數:13,代碼來源:linuxPackagerTest.ts

示例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"
      }
    }),
  })
})
開發者ID:heinzbeinz,項目名稱:electron-builder,代碼行數:15,代碼來源:globTest.ts

示例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"])}))
開發者ID:Icenium,項目名稱:electron-builder,代碼行數:30,代碼來源:linuxPackagerTest.ts

示例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()}, {
開發者ID:heinzbeinz,項目名稱:electron-builder,代碼行數:31,代碼來源:linuxPackagerTest.ts

示例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"
  }))
開發者ID:heinzbeinz,項目名稱:electron-builder,代碼行數:18,代碼來源:debTest.ts

示例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"])}))
開發者ID:heinzbeinz,項目名稱:electron-builder,代碼行數:4,代碼來源:linuxArchiveTest.ts

示例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"])}))
開發者ID:heinzbeinz,項目名稱:electron-builder,代碼行數:9,代碼來源:fpmTest.ts

示例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),
開發者ID:heinzbeinz,項目名稱:electron-builder,代碼行數:31,代碼來源:globTest.ts

示例12: assertPack

test.ifDevOrLinuxCi("AppImage - default icon", () => assertPack("test-app-one", {
    targets: Platform.LINUX.createTarget("appimage"),
  }, {
  tempDirCreated: projectDir => remove(path.join(projectDir, "build"))
  },
))
開發者ID:SimplyAhmazing,項目名稱:electron-builder,代碼行數:6,代碼來源:linuxPackagerTest.ts


注:本文中的out.Platform.LINUX類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。