本文整理汇总了TypeScript中execa.default函数的典型用法代码示例。如果您正苦于以下问题:TypeScript default函数的具体用法?TypeScript default怎么用?TypeScript default使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了default函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: execa
skipOnWindows(plugin, async () => {
const cwd = path.join(__dirname, '../../tmp/plugin', plugin)
await fs.remove(cwd)
const pkg = await readPkg(path.join(__dirname, '../../node_modules', plugin, 'package.json'))
await execa('git', ['clone', pkg.repository.url.split('+')[1], cwd])
const opts = {cwd, stdio: [0, 1, 2]}
await execa('git', ['checkout', `v${pkg.version}`], opts)
await execa('yarn', [], opts)
await execa('yarn', ['test'], opts)
})
开发者ID:jimmyurl,项目名称:cli,代码行数:10,代码来源:plugin.test.ts
示例2: main
async function main() {
for (const zoom of range(minzoom, maxzoom + 1)) {
const mbtilesZoom = `${name}-z${zoom}.mbtiles`
const args = [
'--output=' + mbtilesZoom,
'--force',
'--minimum-zoom=' + zoom,
'--maximum-zoom=' + zoom,
'--full-detail=' + (16 - zoom + 16),
'--no-line-simplification',
'--no-feature-limit',
'--no-tile-size-limit',
'--no-polygon-splitting',
'--no-clipping',
'--no-duplication',
name + ext
]
if (verbose) { console.log('Args', args) }
if (verbose) { console.log('Starting zoom', zoom) }
await execa('tippecanoe', args)
if (verbose) { console.log('Finished zoom', zoom) }
await execa.shell(`sqlite3 ${mbtilesZoom} .dump >> ${name}.dump`)
if (verbose) { console.log('Dumped', mbtilesZoom) }
await execa.shell(`rm ${mbtilesZoom}`)
if (verbose) { console.log('Removed', mbtilesZoom) }
}
// Clean
await execa.shell(`sqlite3 ${name}.mbtiles < ${name}.dump`)
if (verbose) { console.log('Merge dump') }
await execa.shell(`rm -f ${name}.dump`)
if (verbose) { console.log('Removed dump') }
console.log('All Done! :)')
}
开发者ID:osmottawa,项目名称:imports,代码行数:33,代码来源:create-mbtiles.ts
示例3: LintFailure
task: () =>
execa('tslint', [...process.argv.slice(2), '--project', project.tsConfigPath], {
cwd: project.directory,
env: chalk.enabled ? { FORCE_COLOR: 'true' } : {},
stdio: ['ignore', 'pipe', 'pipe'],
}).catch(error => {
throw new LintFailure(project, error);
}),
开发者ID:Jaaess,项目名称:kibana,代码行数:8,代码来源:run_tslint_cli.ts
示例4: execa
useSpinner<void>(`Saving version ${version} to package.json`, async () => {
changeCwdToGrafanaUi();
await execa('npm', ['version', version]);
changeCwdToGrafanaUiDist();
const pkg = require(`${process.cwd()}/package.json`);
pkg.version = version;
await savePackage({ path: `${process.cwd()}/package.json`, pkg });
})();
开发者ID:johntdyer,项目名称:grafana,代码行数:8,代码来源:grafanaui.release.ts
示例5: ProjectFailure
task: () =>
execa(cmd, getArgs(project), {
cwd: project.directory,
env: chalk.enabled ? { FORCE_COLOR: 'true' } : {},
stdio: ['ignore', 'pipe', 'pipe'],
}).catch(error => {
throw new ProjectFailure(project, error);
}),
开发者ID:austec-automation,项目名称:kibana,代码行数:8,代码来源:exec_in_projects.ts
示例6: async
getRoot: async (cwd: Path): Promise<Path | null | undefined> => {
try {
const result = await execa('hg', ['root'], {cwd, env});
return result.stdout;
} catch (e) {
return null;
}
},
开发者ID:elliottsj,项目名称:jest,代码行数:9,代码来源:hg.ts
示例7: execa
getRoot: async cwd => {
try {
const result = await execa('hg', ['root'], {cwd, env});
return result.stdout;
} catch (e) {
return null;
}
},
开发者ID:Volune,项目名称:jest,代码行数:9,代码来源:hg.ts
示例8: async
const findChangedFilesUsingCommand = async (
args: Array<string>,
cwd: Config.Path,
): Promise<Array<Config.Path>> => {
const result = await execa('git', args, {cwd});
return result.stdout
.split('\n')
.filter(s => s !== '')
.map(changedPath => path.resolve(cwd, changedPath));
};
开发者ID:facebook,项目名称:jest,代码行数:11,代码来源:git.ts
示例9: execa
getRoot: async cwd => {
const options = ['rev-parse', '--show-cdup'];
try {
const result = await execa('git', options, {cwd});
return path.resolve(cwd, result.stdout);
} catch (e) {
return null;
}
},
开发者ID:facebook,项目名称:jest,代码行数:11,代码来源:git.ts
注:本文中的execa.default函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论