• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

TypeScript out.Platform.LINUX类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
TypeScript out.Platform.MAC类代码示例发布时间:2022-05-25
下一篇:
TypeScript out.Platform类代码示例发布时间:2022-05-25
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap