Skip to content

Commit

Permalink
chore: repo overall update
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangtao25 committed Nov 19, 2024
1 parent 4b7bcd3 commit a2aa285
Show file tree
Hide file tree
Showing 23 changed files with 287 additions and 2,481 deletions.
1 change: 0 additions & 1 deletion packages/canyon-report/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"autoprefixer": "^10.4.20",
"babel-plugin-canyon": "1.8.78-beta.25",
"babel-plugin-istanbul": "^7.0.0",
"postcss": "^8.4.47",
"swc-plugin-coverage-instrument": "^0.0.25",
Expand Down
3 changes: 2 additions & 1 deletion packages/canyon-report/rsbuild.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import { pluginBabel } from '@rsbuild/plugin-babel';
// import * as path from "node:path";

// console.log(process.env.RSBUILD_MODE)
// import aa from '../../plugins/babel-plugin-canyon/lib'

const normalConfig = defineConfig({
plugins: [pluginReact(),pluginBabel({
babelLoaderOptions:{
plugins:['istanbul','canyon']
plugins:['istanbul','../../plugins/babel-plugin-canyon/lib']
}
})],
output:{
Expand Down
11 changes: 11 additions & 0 deletions plugins/babel-plugin-canyon/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# EditorConfig is awesome: https://EditorConfig.org

root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
6 changes: 3 additions & 3 deletions plugins/babel-plugin-canyon/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# babel-plugin-canyon

To see how to use this plugin, please visit our [documentation](https://docs.canyoncov.com/zh/documentation/ecosystem/babel-plugin-canyon).
# 核心功能

1. 读取istanbul产生的map数据
2. 侦测环境变量,打进istanbul数据里
14 changes: 5 additions & 9 deletions plugins/babel-plugin-canyon/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
'use strict'

module.exports = {
plugins: [
'@babel/plugin-transform-modules-commonjs'
presets: [
"@babel/preset-typescript"
],
env: {
test: {
plugins: ['./lib']
}
}
plugins: [
'@babel/plugin-transform-modules-commonjs',
]
}
3 changes: 3 additions & 0 deletions plugins/babel-plugin-canyon/features/add.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
function add (a,b) {
return a+b
}
4 changes: 0 additions & 4 deletions plugins/babel-plugin-canyon/fixtures/plugin-should-cover.js

This file was deleted.

4 changes: 0 additions & 4 deletions plugins/babel-plugin-canyon/fixtures/should-cover.js

This file was deleted.

6 changes: 6 additions & 0 deletions plugins/babel-plugin-canyon/my-custom-babel-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
plugins: [
'istanbul',
'./lib'
]
}
75 changes: 25 additions & 50 deletions plugins/babel-plugin-canyon/package.json
Original file line number Diff line number Diff line change
@@ -1,62 +1,37 @@
{
"name": "babel-plugin-canyon",
"version": "1.8.78-beta.25",
"description": "A Babel plugin cooperates with istanbul to report the coverage",
"author": "Allen Zhang <[email protected]>",
"license": "MIT",
"homepage": "https://github.com/canyon-project/canyon#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/canyon-project/canyon.git",
"directory": "plugins/babel-plugin-canyon"
"version": "1.8.78-beta.26",
"description": "",
"scripts": {
"release": "babel src --extensions \".ts\" --out-dir lib",
"pretest": "npm run release",
"test": "babel features --config-file ./my-custom-babel-config.js --out-dir dist",
"prepublishOnly": "npm run release",
"format": "biome check --write --unsafe ./src",
"preinstall": "npm run release"
},
"bugs": "https://github.com/canyon-project/canyon/issues",
"keywords": [
"babel-plugin"
],
"keywords": [],
"main": "lib/index.js",
"files": [
"lib"
],
"scripts": {
"release": "node scripts/gen-template.js && babel src --out-dir lib",
"pretest": "npm run release",
"test": "cross-env NODE_ENV=test nyc --reporter=lcov --reporter=json mocha --timeout 5000 test/*.js",
"prepublishOnly": "npm run release"
},
"standard": {
"ignore": [
"fixtures/*.js"
]
},
"nyc": {
"include": [
"src/*.js",
"fixtures"
],
"require": [
"@babel/register"
],
"sourceMap": false,
"instrument": false
},
"dependencies": {
"@babel/helper-plugin-utils": "^7.0.0",
"@babel/generator": "^7.25.6"
},
"author": "",
"license": "ISC",
"devDependencies": {
"@babel/cli": "^7.24.1",
"@babel/core": "^7.24.1",
"@babel/plugin-transform-modules-commonjs": "^7.24.1",
"@babel/register": "^7.23.7",
"babel-plugin-istanbul": "6.1.1",
"chai": "^4.2.0",
"@babel/cli": "^7.25.9",
"@babel/core": "^7.26.0",
"@babel/preset-typescript": "^7.26.0",
"@biomejs/biome": "1.9.4",
"@types/babel__core": "^7.20.5",
"@types/babel__generator": "^7.6.8",
"@types/babel__helper-plugin-utils": "^7.10.3",
"babel-plugin-istanbul": "^7.0.0",
"cross-env": "^7.0.3",
"mocha": "^6.2.2",
"nyc": "^15.0.0",
"standard": "^14.3.1"
"jest": "^29.7.0",
"typescript": "^5.6.3"
},
"peerDependencies": {
"axios": "*"
"dependencies": {
"@babel/generator": "^7.26.2",
"@babel/helper-plugin-utils": "^7.25.9"
}
}
22 changes: 0 additions & 22 deletions plugins/babel-plugin-canyon/scripts/gen-template.js

This file was deleted.

23 changes: 0 additions & 23 deletions plugins/babel-plugin-canyon/src/helpers/extract-coverage-data.js

This file was deleted.

31 changes: 0 additions & 31 deletions plugins/babel-plugin-canyon/src/helpers/generate-canyon.js

This file was deleted.

This file was deleted.

Loading

0 comments on commit a2aa285

Please sign in to comment.