1 Star 0 Fork 0

QuickSpeed/react-beautiful-dnd

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
browser-test-harness.js 1.38 KB
一键复制 编辑 原始数据 按行查看 历史
Alex Reardon 提交于 2020-04-17 17:14 . initial bumping
// @flow
const childProcess = require('child_process');
const path = require('path');
const waitPort = require('wait-port');
const ports = require('./server-ports');
const storybook = childProcess.spawn(process.execPath, [
path.join('node_modules', '.bin', 'start-storybook'),
'-p',
`${ports.storybook}`,
]);
const cspServer = childProcess.spawn(process.execPath, [
path.join('csp-server', 'start.sh'),
`${ports.cspServer}`,
]);
process.on('exit', () => {
storybook.kill();
cspServer.kill();
});
Promise.all([
waitPort({
host: 'localhost',
port: ports.storybook,
timeout: 60000,
}),
waitPort({
host: 'localhost',
port: ports.cspServer,
timeout: 60000,
}),
])
.then(() => {
if (!process.argv[2]) {
// eslint-disable-next-line no-console
console.warn('Started servers but no command supplied to run after');
process.exit();
}
const child = childProcess.spawn(process.argv[2], process.argv.slice(3), {
stdio: 'inherit',
});
process.on('exit', () => {
child.kill();
});
child.on('exit', (code) => {
process.exit(code);
});
})
.catch((error) => {
// eslint-disable-next-line no-console
console.error('Unable to spin up standalone servers');
// eslint-disable-next-line no-console
console.error(error);
storybook.kill();
cspServer.kill();
process.exit(1);
});
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/quick-speed/react-beautiful-dnd.git
git@gitee.com:quick-speed/react-beautiful-dnd.git
quick-speed
react-beautiful-dnd
react-beautiful-dnd
master

搜索帮助