Commit 3ecf7a5d by lxyang

feat:合并修改

parents f93bb966 81cd6d81
# babel-plugin-istanbul
# babel-plugin-ry-istanbul
[![Coverage Status](https://coveralls.io/repos/github/istanbuljs/babel-plugin-istanbul/badge.svg?branch=master)](https://coveralls.io/github/istanbuljs/babel-plugin-istanbul?branch=master)
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)
......@@ -30,12 +30,17 @@ BRANCH需要对比的分支isPitchingPile为true时默认origin/master当ISPITCH
}
]
]
## 新增全局传值方法
IS_PITCHING_PILE是否插桩
INCREMENT是否过滤增量文件
BRANCH需要对比的分支isPitchingPile为true时默认origin/master当ISPITCHINGPILE为false的时候可以不穿
全局配置:如.env.dev文件下增加全局变量插桩,babel-plugin-ry-istanbul同样可以取到对应值,如VUE全局变量前记得添加VUE_APP_前缀,其他则需要看使用框架是否需要添加前缀
## Usage
Install it:
```
npm install --save-dev babel-plugin-istanbul
npm install --save-dev babel-plugin-ry-istanbul
```
Add it to `.babelrc` in test mode:
......@@ -73,7 +78,7 @@ It has been tested with [bemusic/bemuse](https://codecov.io/github/bemusic/bemus
Configure Mocha to transpile JavaScript code using Babel, then you can run your tests with [`nyc`](https://github.com/bcoe/nyc), which will collect all the coverage report.
babel-plugin-istanbul respects the `include`/`exclude` configuration options from nyc,
babel-plugin-ry-istanbul respects the `include`/`exclude` configuration options from nyc,
but you also need to __configure NYC not to instrument your code__ by adding these settings in your `package.json`:
```js
......@@ -127,7 +132,7 @@ By default, this plugin will pick up inline source maps and attach them to the i
If you're instrumenting code programatically, you can pass a source map explicitly.
```js
import babelPluginIstanbul from 'babel-plugin-istanbul';
import babelPluginIstanbul from 'babel-plugin-ry-istanbul';
function instrument(sourceCode, sourceMap, fileName) {
return babel.transform(sourceCode, {
......@@ -143,10 +148,10 @@ function instrument(sourceCode, sourceMap, fileName) {
## Credit where credit is due
The approach used in `babel-plugin-istanbul` was inspired by [Thai Pangsakulyanont](https://github.com/dtinth)'s original library [`babel-plugin-__coverage__`](https://github.com/dtinth/babel-plugin-__coverage__).
The approach used in `babel-plugin-ry-istanbul` was inspired by [Thai Pangsakulyanont](https://github.com/dtinth)'s original library [`babel-plugin-__coverage__`](https://github.com/dtinth/babel-plugin-__coverage__).
## `babel-plugin-istanbul` for enterprise
## `babel-plugin-ry-istanbul` for enterprise
Available as part of the Tidelift Subscription.
The maintainers of `babel-plugin-istanbul` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-babel-plugin-istanbul?utm_source=npm-babel-plugin-istanbul&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
The maintainers of `babel-plugin-ry-istanbul` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-babel-plugin-ry-istanbul?utm_source=npm-babel-plugin-ry-istanbul&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
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