Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Upgrade project engineering - Part 1 #2365

Merged
merged 52 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
fdf3c9d
chore: move site to root dir
lvisei Mar 18, 2024
c75d33b
chore: add clean scripte
lvisei Mar 18, 2024
2ee9b02
chore: remove old files
lvisei Mar 18, 2024
07d50cb
chore: dev-demos move to legacy
lvisei Mar 18, 2024
d0e1d25
chore: 升级 husky v9
lvisei Mar 19, 2024
ff375cf
chore: add lint-staged
lvisei Mar 20, 2024
de15e85
chore: remove rollup from root dir
lvisei Mar 21, 2024
e275348
ci: typo name
lvisei Mar 21, 2024
273c6e5
chore: dumi gitignore
lvisei Mar 21, 2024
199bbc1
chore: dev demos add dev-local script
lvisei Mar 21, 2024
3ad634b
chore: adjustment test project
lvisei Mar 21, 2024
8e448be
chore: note todo
lvisei Mar 21, 2024
d9984a9
chore: refactor build tool
lvisei Mar 23, 2024
c09edd9
chore: delete unuse
lvisei Mar 23, 2024
3fc59dd
chore: ignore config
lvisei Mar 23, 2024
4449e11
chore: globe d.ts
lvisei Mar 24, 2024
dc8c941
chore: per pakages ts config
lvisei Mar 24, 2024
2dd075f
chore: delete unused files
lvisei Mar 25, 2024
300e640
chore: move dependencies
lvisei Mar 25, 2024
5971ab8
chore: move dev-docs
lvisei Mar 25, 2024
e1d70d7
chore: ci unuse wei/wget@v1
lvisei Mar 25, 2024
a69f423
chore: flat eslint config
lvisei Mar 25, 2024
11dfbd1
chore: enables support of experimental Flat Config
lvisei Mar 25, 2024
9fc8fb1
chore: remove eslintignore
lvisei Mar 25, 2024
d0966c4
chore: format fix
lvisei Mar 25, 2024
d88a7c0
chore: lint parallel
lvisei Mar 25, 2024
74b3480
chore: style lint
lvisei Mar 26, 2024
b00fa22
chore: add ci actions
lvisei Mar 26, 2024
07bfa1a
chore: add check format
lvisei Mar 26, 2024
dc4a31e
chore: root config
lvisei Mar 26, 2024
cdb8985
chore: remove glsl lint hook
lvisei Mar 26, 2024
380ec0e
wip: prettier fix
lvisei Mar 26, 2024
d37f833
wip: check format
lvisei Mar 26, 2024
39e5a8e
chore: move test out form src
lvisei Mar 26, 2024
ba9eb43
chore: typo name
lvisei Mar 26, 2024
90be1d5
chore: testMatch
lvisei Mar 26, 2024
cb3410a
chore: ts node
lvisei Mar 26, 2024
d372f08
chore: note
lvisei Mar 26, 2024
78d7ff1
chore: coverage threshold
lvisei Mar 26, 2024
e7f976d
chore: test run macos
lvisei Mar 26, 2024
7bc5a92
chore: jest config to esm
lvisei Mar 26, 2024
9aa586b
chore: mis deps
lvisei Mar 26, 2024
e80eb08
chore: esm to cmj
lvisei Mar 26, 2024
49d408f
chore: change to ubuntu-latest
lvisei Mar 27, 2024
d51f113
chore: rename dir
lvisei Mar 27, 2024
5d14faa
chore: typo
lvisei Mar 27, 2024
4a736fc
chore: tigger gitleaks to push
lvisei Mar 27, 2024
ab5a0ce
chore: turn on test-cover
lvisei Mar 27, 2024
917a475
chore: typo name
lvisei Mar 27, 2024
bdca32b
chore: env config
lvisei Mar 27, 2024
5850938
chore: split test
lvisei Mar 27, 2024
f4e58f5
chore: add lint size
lvisei Mar 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
21 changes: 0 additions & 21 deletions .eslintignore

This file was deleted.

47 changes: 0 additions & 47 deletions .eslintrc.js

This file was deleted.

29 changes: 29 additions & 0 deletions .fatherrc.base.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { defineConfig } from 'father';

const isProduction = process.env.NODE_ENV === 'production';

export default defineConfig({
esm: {
output: 'es',
transformer: 'esbuild',
platform: 'browser',
},
cjs: isProduction
? {
output: 'lib',
transformer: 'esbuild',
platform: 'node',
}
: undefined,
extraBabelPlugins: [
[
// import glsl as raw text
'babel-plugin-inline-import',
{ extensions: ['.glsl'] },
],
// import css as inline
'transform-import-css-l7',
],
targets: { chrome: 51, node: 18 },
// more config see father docs https://github.com/umijs/father/blob/master/docs/config.md
});
23 changes: 0 additions & 23 deletions .fatherrc.ts

This file was deleted.

File renamed without changes.
32 changes: 0 additions & 32 deletions .github/workflows/build_test_e2e.yml

This file was deleted.

22 changes: 0 additions & 22 deletions .github/workflows/build_test_unit.yml

This file was deleted.

18 changes: 8 additions & 10 deletions .github/workflows/gitleaks.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
name: gitleaks

on: [push,pull_request]
on: push

jobs:
gitleaks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '1'
- name: wget
uses: wei/wget@v1
with:
args: -O .gitleaks.toml https://raw.githubusercontent.com/ycjcl868/gitleaks/master/.gitleaks.toml
- name: gitleaks-action
uses: zricethezav/[email protected]
- uses: actions/checkout@v2
with:
fetch-depth: '1'
- name: gitleaks-action
uses: zricethezav/[email protected]
with:
config-path: .github/.gitleaks.toml
4 changes: 2 additions & 2 deletions .github/workflows/issue_assigness.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ jobs:
actions: 'add-assignees'
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
assignees: 'lzxue,heiyexing,lvise'
random-to: 1
assignees: 'lzxue,heiyexing,lvisei'
random-to: 1
32 changes: 32 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Lint

on: [pull_request]

jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: yarn

- name: Check
run: |
yarn check-deps
#TODO: turn on after format fixd
# yarn check-format

- name: Lint
run: yarn lint:ts

#TODO: turn on after fixd
# - name: Stylelint
# run: yarn lint:css
79 changes: 79 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Test

on:
push:
branches: [master]
pull_request:

jobs:
unit-test:
# TODO: change to ubuntu-latest, gl CONTEXT.getExtension('STACKGL_resize_drawingbuffer') must in macos-latest
runs-on: macos-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: yarn

- name: Coverage Test
run: yarn test-cover

- name: Upload test coverage
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

integration-test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: yarn

- name: Install Playwright browsers
run: npx playwright install --with-deps

- name: Integration Test
run: yarn test:integration

- name: Upload snapshots to GitHub Actions Artifacts
if: always()
uses: actions/upload-artifact@v3
with:
name: snapshots
path: |
test/integration/snapshots/**/*/*-actual.png
retention-days: 1

size-test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: yarn

- name: Szie Test With Build
run: yarn test:size
23 changes: 2 additions & 21 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*
yarn.lock
package-lock.json

# Runtime data
pids
Expand Down Expand Up @@ -69,29 +70,9 @@ jspm_packages/

# End of https://www.gitignore.io/api/node

lib/
dist/
es/

.DS_Store
.cache
.idea

package-lock.json
git_log.sh
node_modules/
packages/l7/package_bak.json

stories/Test
packages/draw/node_modules/@turf
packages/district/src/data

.umi-production/
.umi/
docs-dist
/packages/leaflet
site_temp
/packages/site/server

*-actual.png
*-diff.png
*-diff.png
3 changes: 3 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

yarn commitlint --edit "$1"
3 changes: 3 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

npx lint-staged
Loading
Loading