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


TypeScript Platform.LINUX.createTarget方法代碼示例

本文整理匯總了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(),
      ])
    },
  })
})
開發者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


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