mirror of https://gitee.com/antv-l7/antv-l7
Chore test preCommit 增加测试用例校验 (#1281)
* docs: 文档的相关配置 * chore: package json 测试覆盖 * test(source): test * fix: test ci * chore: ci * chore: ci add worker build * chore: glsl 支持热更新 * chore: test cover view * chore: ci test * chore: precommit 增加 test 校验 * chore: remove stroybook lint add dumo demo lint * chore: pre-commit build 校验 * chore: update ci 触发 * chore: lint 相关配置
This commit is contained in:
parent
08cab1d741
commit
d8a9ccb884
|
@ -1,6 +1,6 @@
|
|||
name: lint
|
||||
|
||||
on: [push, pull_request]
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
|
@ -15,4 +15,4 @@ jobs:
|
|||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- run: yarn
|
||||
- run: yarn lint
|
||||
- run: yarn build
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
name: 🔂 Surge PR Preview
|
||||
|
||||
on: pull_request
|
||||
|
||||
jobs:
|
||||
preview:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [14.x]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- uses: afc163/surge-preview@v1
|
||||
with:
|
||||
surge_token: ${{ secrets.SURGE_TOKEN }}
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
dist: public
|
||||
build: |
|
||||
yarn --frozen-lockfile
|
||||
yarn site:build
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
name: test
|
||||
|
||||
on: [push, pull_request]
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
|
|
|
@ -1,71 +0,0 @@
|
|||
import { PointLayer, Scene } from '@antv/l7';
|
||||
import { GaodeMap } from '@antv/l7-maps';
|
||||
import React, { useEffect } from 'react';
|
||||
|
||||
export default () => {
|
||||
useEffect(() => {
|
||||
const scene = new Scene({
|
||||
id: 'map',
|
||||
pickBufferScale: 1.0,
|
||||
map: new GaodeMap({
|
||||
style: 'light',
|
||||
center: [-121.24357, 37.58264],
|
||||
pitch: 0,
|
||||
zoom: 6.45,
|
||||
}),
|
||||
});
|
||||
scene.on('loaded', () => {
|
||||
fetch(
|
||||
'https://gw.alipayobjects.com/os/basement_prod/6c4bb5f2-850b-419d-afc4-e46032fc9f94.csv',
|
||||
)
|
||||
.then((res) => res.text())
|
||||
.then((data) => {
|
||||
const pointLayer = new PointLayer({
|
||||
autoFit:true
|
||||
})
|
||||
.source(data.slice(0, 1000), {
|
||||
parser: {
|
||||
type: 'csv',
|
||||
x: 'Longitude',
|
||||
y: 'Latitude',
|
||||
},
|
||||
})
|
||||
.shape('circle')
|
||||
.size(16)
|
||||
.active(true)
|
||||
.select({
|
||||
color: 'red',
|
||||
})
|
||||
.color('Magnitude', [
|
||||
'#0A3663',
|
||||
'#1558AC',
|
||||
'#3771D9',
|
||||
'#4D89E5',
|
||||
'#64A5D3',
|
||||
'#72BED6',
|
||||
'#83CED6',
|
||||
'#A6E1E0',
|
||||
'#B8EFE2',
|
||||
'#D7F9F0',
|
||||
])
|
||||
.style({
|
||||
opacity: 1,
|
||||
strokeWidth: 0,
|
||||
stroke: '#fff',
|
||||
});
|
||||
|
||||
scene.addLayer(pointLayer);
|
||||
},
|
||||
)
|
||||
})
|
||||
}, [])
|
||||
return (
|
||||
<div
|
||||
id="map"
|
||||
style={{
|
||||
height:'500px',
|
||||
position: 'relative'
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
|
@ -28,18 +28,17 @@ export default () => {
|
|||
},
|
||||
);
|
||||
|
||||
|
||||
scene.on('loaded', () => {
|
||||
scene.addLayer(layer);
|
||||
})
|
||||
}, [])
|
||||
});
|
||||
}, []);
|
||||
return (
|
||||
<div
|
||||
id="map"
|
||||
style={{
|
||||
height:'500px',
|
||||
position: 'relative'
|
||||
height: '500px',
|
||||
position: 'relative',
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
### 点图层
|
||||
<code src="./circle.tsx"></code>
|
|
@ -15,7 +15,6 @@ export default () => {
|
|||
}),
|
||||
});
|
||||
|
||||
|
||||
const layerTile = new RasterLayer({
|
||||
zIndex: 1,
|
||||
});
|
||||
|
@ -26,25 +25,22 @@ export default () => {
|
|||
type: 'rasterTile',
|
||||
tileSize: 256,
|
||||
// zoomOffset: 0
|
||||
zoomOffset: 1
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
|
||||
zoomOffset: 1,
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
scene.on('loaded', () => {
|
||||
scene.addLayer(layerTile);
|
||||
})
|
||||
}, [])
|
||||
});
|
||||
}, []);
|
||||
return (
|
||||
<div
|
||||
id="map"
|
||||
style={{
|
||||
height:'500px',
|
||||
position: 'relative'
|
||||
height: '500px',
|
||||
position: 'relative',
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -163,10 +163,10 @@
|
|||
"postbuild": "yarn build:declarations",
|
||||
"build:declarations": "lerna run tsc --stream --no-bail",
|
||||
"fix": "run-p -c 'lint:ts-* --fix'",
|
||||
"lint:fix": "prettier --write docs/api/**/*.md docs/api/*.md stories/**/**/*.tsx *.md",
|
||||
"lint:fix": "prettier --write docs/api/**/*.md docs/api/*.md dev-demos/**/**/*.tsx *.md",
|
||||
"lint:examples": "eslint packages/site/examples --fix --ext .js",
|
||||
"lint:css": "stylelint 'packages/**/src/**/*.js{,x}'",
|
||||
"lint:ts-prod1": "tslint --fix --config tslint.prod.json 'packages/**/*.ts{,x}'",
|
||||
"lint:ts-prod": "tslint --fix --config tslint.prod.json 'packages/**/*.ts{,x}'",
|
||||
"lint:ts-test": "tslint --fix --config tslint.json 'packages/**/*.{spec,story}.ts{,x}'",
|
||||
"lint:ts": "run-p -c lint:ts-*",
|
||||
"lint": "run-p -c lint:*",
|
||||
|
@ -194,11 +194,11 @@
|
|||
},
|
||||
"workspaces": [
|
||||
"packages/*",
|
||||
"stories/*"
|
||||
"dev-demos/*"
|
||||
],
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "yarn run lint",
|
||||
"pre-commit": "yarn run build && yarn run test-cover",
|
||||
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
|
||||
}
|
||||
},
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
"author": "xiaoiver",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"gl": "^4.4.0"
|
||||
"gl": "^5.0.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@antv/l7-core": "2.9.23",
|
||||
|
|
Loading…
Reference in New Issue