Skip to content

Commit

Permalink
remove build-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
cenfun committed Mar 22, 2024
1 parent 1c4bfca commit 2c3392b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 87 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ await coverageReport.generate();
// const { CoverageReport } = require('monocart-coverage-reports');
// const coverageReport = new CoverageReport(coverageOptions);
```
- [example v8](https://github.com/cenfun/monocart-coverage-reports/blob/main/test/test-v8.js)
- [example istanbul](https://github.com/cenfun/monocart-coverage-reports/blob/main/test/test-istanbul.js)
- [example v8](./test/test-v8.js)
- [example istanbul](./test/test-istanbul.js)

## Default Options
- [lib/default/options.js](https://github.com/cenfun/monocart-coverage-reports/blob/main/lib/default/options.js)
- [lib/default/options.js](./lib/default/options.js)
- `reports` [Available Reports](#available-reports)
- `entryFilter` and `sourceFilter` [Using `entryFilter` and `sourceFilter` to filter the results for V8 report](#using-entryfilter-and-sourcefilter-to-filter-the-results-for-v8-report)
- `sourcePath` [Resolve `sourcePath` for the Source Files](#resolve-sourcepath-for-the-source-files)
Expand All @@ -84,7 +84,7 @@ await coverageReport.generate();
- `logging` [Debug for Coverage and Sourcemap](#debug-for-coverage-and-sourcemap)
- `onEnd` [onEnd Hook](#onend-hook)

- Declaration [lib/index.d.ts](https://github.com/cenfun/monocart-coverage-reports/blob/main/lib/index.d.ts)
- Declaration [lib/index.d.ts](./lib/index.d.ts)

## Available Reports

Expand Down Expand Up @@ -216,17 +216,17 @@ coverageReport.cleanCache();
## Collecting Istanbul Coverage Data
- Instrumenting source code
> Before collecting Istanbul coverage data, It requires your source code is instrumented with Istanbul
- webpack: [babel-plugin-istanbul](https://github.com/istanbuljs/babel-plugin-istanbul), example: [webpack.config-istanbul.js](https://github.com/cenfun/monocart-coverage-reports/blob/main/test/webpack.config-istanbul.js)
- webpack: [babel-plugin-istanbul](https://github.com/istanbuljs/babel-plugin-istanbul), example: [webpack.config-istanbul.js](./test/webpack.config-istanbul.js)
- rollup: [rollup-plugin-istanbul](https://github.com/artberri/rollup-plugin-istanbul)
- vite: [vite-plugin-istanbul](https://github.com/ifaxity/vite-plugin-istanbul)
- Browser
- Collecting coverage data from `window.__coverage__`, example: [test-istanbul.js](https://github.com/cenfun/monocart-coverage-reports/blob/main/test/test-istanbul.js)
- Collecting coverage data from `window.__coverage__`, example: [test-istanbul.js](./test/test-istanbul.js)
- Node.js
- Collecting coverage data from `global.__coverage__`
## Collecting V8 Coverage Data
- For source code: enable `sourcemap` and do not compress/minify:
- [webpack](https://webpack.js.org/configuration/): `devtool: source-map` and `mode: development`, example [webpack.config-v8.js](https://github.com/cenfun/monocart-coverage-reports/blob/main/test/webpack.config-v8.js)
- [webpack](https://webpack.js.org/configuration/): `devtool: source-map` and `mode: development`, example [webpack.config-v8.js](./test/webpack.config-v8.js)
- [rollup](https://rollupjs.org/configuration-options/): `sourcemap: true`
- [vite](https://vitejs.dev/config/build-options.html): `sourcemap: true` and `minify: false`
- [esbuild](https://esbuild.github.io/api/): `sourcemap: true` and `minify: false`
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
},
"types": "./lib/index.d.ts",
"scripts": {
"build-docs": "node ./scripts/build-docs.js",
"build-test": "node ./scripts/build-test.js",
"build": "sf lint && sf b -p && npm run build-test",
"test-node-env": "cross-env NODE_V8_COVERAGE=.temp/v8-coverage-env node ./test/test-node-env.js && node ./test/generate-report.js",
Expand All @@ -51,7 +50,7 @@
"test-merge": "node ./test/test-merge.js",
"test-merge-istanbul": "node ./test/test-merge-istanbul.js",
"test-client": "node ./test/test-client.js",
"test-all": "npm run test-node && npm run test-browser && npm run test-cli && npm run test-tsx && npm run test-merge && npm run build-docs",
"test-all": "npm run test-node && npm run test-browser && npm run test-cli && npm run test-tsx && npm run test-merge",
"test": "npx mcr npm run test-all -c test/mcr.config.mcr.js",
"test:snap": "cross-env TEST_SNAPSHOT=true npm run test",
"dev": "sf d v8",
Expand Down Expand Up @@ -95,4 +94,4 @@
"tsx": "^4.7.1",
"ws": "^8.16.0"
}
}
}
74 changes: 0 additions & 74 deletions scripts/build-docs.js

This file was deleted.

4 changes: 1 addition & 3 deletions test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@
"babel-plugin-istanbul": "^6.1.1",
"cross-env": "^7.0.3",
"foreground-child": "^3.1.1",
"github-markdown-css": "^5.5.1",
"koa": "^2.15.1",
"koa-static-resolver": "^1.0.6",
"marked": "^12.0.1",
"open": "^10.1.0",
"playwright": "^1.42.1",
"puppeteer-chromium-resolver": "^22.0.0",
Expand All @@ -27,4 +25,4 @@
"typescript": "^5.4.2",
"webpack": "^5.90.3"
}
}
}

0 comments on commit 2c3392b

Please sign in to comment.