本文整理汇总了TypeScript中ember-cli/lib/ext/promise.all函数的典型用法代码示例。如果您正苦于以下问题:TypeScript all函数的具体用法?TypeScript all怎么用?TypeScript all使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了all函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: fsCopy
.then((files) => Promise.all(files.map((file) => {
if (file === '.gitignore'){
// don't overwrite the .gitignore file
return Promise.resolve();
}
return fsCopy(path.join('dist', file), path.join('.', file))
})));
开发者ID:DevVersion,项目名称:angular-cli,代码行数:7,代码来源:github-pages-deploy.ts
示例2: function
run: function(options) {
var builder = new Builder({
ui: this.ui,
outputPath: options.outputPath,
project: this.project,
environment: options.environment
});
var watcher = new Watcher({
ui: this.ui,
builder: builder,
analytics: this.analytics,
options: options
});
var serverRoot = './server';
var serverWatcher = null;
if (existsSync(serverRoot)) {
serverWatcher = new ServerWatcher({
ui: this.ui,
analytics: this.analytics,
watchedDir: path.resolve(serverRoot)
});
}
var expressServer = new ExpressServer({
ui: this.ui,
project: this.project,
watcher: watcher,
serverRoot: serverRoot,
serverWatcher: serverWatcher
});
var liveReloadServer = new LiveReloadServer({
ui: this.ui,
analytics: this.analytics,
project: this.project,
watcher: watcher,
expressServer: expressServer
});
return Promise.all([
liveReloadServer.start(options),
expressServer.start(options)
]).then(function() {
return new Promise(function() {
// hang until the user exits.
});
});
}
开发者ID:TheLarkInn,项目名称:angular-cli,代码行数:50,代码来源:serve.ts
示例3: fsCopy
.then((files) => Promise.all(files.map((file) => fsCopy(path.join('dist', file), path.join('.', file)))))
开发者ID:DrMabuse23,项目名称:angular-cli,代码行数:1,代码来源:github-pages-deploy.ts
注:本文中的ember-cli/lib/ext/promise.all函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论