本文整理汇总了TypeScript中p-all类的典型用法代码示例。如果您正苦于以下问题:TypeScript p-all类的具体用法?TypeScript p-all怎么用?TypeScript p-all使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了p-all类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: buildDemos
function buildDemos(filePaths: string[]) {
const functions = filePaths.map(filePath => () => {
return buildDemo(filePath);
});
let concurrentNumber = 2;
if (argv.concurrency) {
concurrentNumber = argv.concurrency;
}
return pAll(functions, {concurrency: concurrentNumber});
}
开发者ID:Artfloriani,项目名称:ionic,代码行数:10,代码来源:demos.prod.ts
示例2: buildTests
function buildTests(filePaths: string[]) {
const functions = filePaths.map(filePath => () => {
return buildTest(filePath);
});
// Run 2 tests at a time unless the `concurrency` arg is passed
let concurrentNumber = 2;
if (argv.concurrency) {
concurrentNumber = argv.concurrency;
}
return pAll(functions, {concurrency: concurrentNumber}).then(() => {
// copy over all of the protractor tests to the correct location now
return copyProtractorTestContent(filePaths);
});
}
开发者ID:Artfloriani,项目名称:ionic,代码行数:15,代码来源:e2e.prod.ts
示例3: buildDemos
function buildDemos(filePaths: string[]) {
var batches = chunkArrayInGroups(filePaths, argv.batches || 1);
var batch = argv.batch || 0;
if(batch >= batches.length) {
throw new Error(`Batch number higher than total number of batches.`);
}
console.log(`Compiling ${batches[batch].length} of ${filePaths.length} Demos ...`);
const functions = batches[batch].map(filePath => () => {
return buildDemo(filePath);
});
let concurrentNumber = 2;
if (argv.concurrency) {
concurrentNumber = argv.concurrency;
}
return pAll(functions, {concurrency: concurrentNumber});
}
开发者ID:aggarwalankush,项目名称:ionic,代码行数:18,代码来源:demos.prod.ts
注:本文中的p-all类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论