Commit f5dfdeca by 刘旭阳

Merge branch '0.1.1' into 'master'

0.1.1 See merge request !12
parents d560d0e2 765a5437
{ {
"name": "babel-plugin-ry-istanbul-web", "name": "babel-plugin-ry-istanbul-web",
"version": "0.1.0", "version": "0.1.2",
"author": "Thai Pangsakulyanont @dtinth", "author": "Thai Pangsakulyanont @dtinth",
"license": "BSD-3-Clause", "license": "BSD-3-Clause",
"description": "A babel plugin that adds istanbul instrumentation to ES6 code", "description": "A babel plugin that adds istanbul instrumentation to ES6 code",
......
...@@ -119,7 +119,7 @@ export default declare(api => { ...@@ -119,7 +119,7 @@ export default declare(api => {
const realPath = getRealpath(this.file.opts.filename) const realPath = getRealpath(this.file.opts.filename)
const { instrmenttation = {} } = this.nycConfig // npm引入参数 const { instrmenttation = {} } = this.nycConfig // npm引入参数
let IS_PITCHING_PILE_DATA = false let IS_PITCHING_PILE_DATA = false
let INCREMENT_DATA = 'false' let INCREMENT_DATA = false
let BRANCH_DATA = 'origin/master' let BRANCH_DATA = 'origin/master'
let processData = {} let processData = {}
Object.keys(process.env).forEach(item => { Object.keys(process.env).forEach(item => {
...@@ -158,7 +158,7 @@ export default declare(api => { ...@@ -158,7 +158,7 @@ export default declare(api => {
// }) // })
// 后面解开 // 后面解开
if ((INCREMENT_DATA || INCREMENT_DATA === 'true') && BRANCH_DATA) { if ((INCREMENT_DATA || INCREMENT_DATA === 'true') && BRANCH_DATA) {
const gitDiffCode = execSync(`git add . && git diff ${BRANCH_DATA}`) const gitDiffCode = execSync(`git add . && git diff --cached ${BRANCH_DATA}`)
const diffData = parseDiffData(gitDiffCode.toString()) const diffData = parseDiffData(gitDiffCode.toString())
diffScreen = diffData.find(item => { diffScreen = diffData.find(item => {
return realPath.indexOf(item.to) > -1 return realPath.indexOf(item.to) > -1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment