1 Star 0 Fork 0

animalcoder/Vue

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
test.js 1.10 KB
一键复制 编辑 原始数据 按行查看 历史
animalcoder 提交于 2020-03-23 09:59 +08:00 . Vue6
#!/usr/bin/env node
var cp = require('child_process')
var fs = require('fs')
var path = require('path')
var shouldRunBrowserTests = !process.env.TRAVIS_PULL_REQUEST ||
process.env.TRAVIS_PULL_REQUEST === 'false'
var node = cp.spawn('npm', ['run', 'test-node'], { stdio: 'inherit' })
node.on('close', function (code) {
if (code === 0 && shouldRunBrowserTests) {
runBrowserTests()
} else {
process.exit(code)
}
})
function runBrowserTests () {
var zuulYmlPath = path.join(__dirname, '..', '.zuul.yml')
writeES5ZuulYml()
cp.spawn('npm', ['run', 'test-browser-es5'], { stdio: 'inherit' })
.on('close', function (code) {
if (code !== 0) process.exit(code)
writeES6ZuulYml()
cp.spawn('npm', ['run', 'test-browser-es6'], { stdio: 'inherit' })
.on('close', function (code) {
process.exit(code)
})
})
function writeES5ZuulYml () {
fs.writeFileSync(zuulYmlPath, fs.readFileSync(path.join(__dirname, 'zuul-es5.yml')))
}
function writeES6ZuulYml () {
fs.writeFileSync(zuulYmlPath, fs.readFileSync(path.join(__dirname, 'zuul-es6.yml')))
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/animalcoder/Vue.git
git@gitee.com:animalcoder/Vue.git
animalcoder
Vue
Vue
master

搜索帮助