Skip to content

Commit

Permalink
Merge branch 'master' into hancheng/refactor-red-packet-history
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack-Works committed Mar 18, 2021
2 parents a598330 + 643a95b commit d0115b4
Show file tree
Hide file tree
Showing 328 changed files with 4,697 additions and 5,806 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
command: sudo apt-get install zip
- run:
name: Build Maskbook
command: npm run build-ci
command: npx build-ci
- store_artifacts:
path: Maskbook.base.zip
destination: /Maskbook.base.zip
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
${{ runner.os }}-node-
- run: sudo npm i -g pnpm
- run: npm run ci
- run: npm run build-ci
- run: npx build-ci
- name: Upload `Maskbook.base.zip`
uses: actions/upload-artifact@v2
with:
Expand Down
16 changes: 12 additions & 4 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,26 @@ jobs:
key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-
- run: sudo npm i -g pnpm
- run: npm run ci
- run: npx prettier --list-different .
- run: sudo npm install --global pnpm
- run: pnpm ci
- run: npx build -- echo "Check tsc"
- run: npx locale-kit
- run: npm run lint:typecoverage
- run: npm run locale-kit
working-directory: packages/maskbook
- run: npm run lint:report
- name: Upload ESLint Report
uses: actions/upload-artifact@v2
with:
name: eslint
path: ./reports/junit
prettier:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/setup-node@v2-beta
- run: npx prettier --list-different .
storybook:
runs-on: ubuntu-20.04
continue-on-error: false
Expand Down
2 changes: 1 addition & 1 deletion .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
_
_
1 change: 0 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
. "$(dirname $0)/_/husky.sh"

npx lint-staged
npx locale-kit --sync-keys
18 changes: 18 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,23 @@
"cSpell.words": ["Reificated"],
"markdownlint.config": {
"no-inline-html": false
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build]
command = "npm run netlify-install && cd packages/cli-dev-build && npx gulp buildNetlify"
command = "./scripts/netlify.sh"
publish = "packages/netlify"
ignore = "git diff --quiet HEAD^ HEAD packages/dashboard packages/storybook-shared packages/theme packages/netlify packages/shared packages/icons"
[build.environment]
Expand Down
31 changes: 13 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,27 @@
"scripts": {
"start": "dev",
"start-e2e": "env target=E2E dev",
"ts": "dev -- echo Starting TypeScript compiler...",
"ts": "dev --daemon",
"go": "dev --help",
"start:storybook": "dev -- start-storybook -p 9009 -s public --quiet",
"build": "build",
"build-e2e": "env target=E2E build",
"build-ci": "ts-node scripts/ci-build.ts",
"build-storybook": "build -- build-storybook -s public --quiet",
"build-ios": "run-s build:ios:webpack build:ios:ext:prebuilt",
"build:ios:ext:prebuilt": "ts-node scripts/webextensiom-shim-prebuilt.ts",
"build:ios:ext:prebuilt": "webextensiom-shim-prebuilt",
"build:ios:webpack": "build iOS",
"lint": "eslint -c ./packages/.eslintrc.json packages/ --ext .ts,.tsx --fix --cache",
"lint:report": "eslint -c ./packages/.eslintrc.json packages/ --ext .ts,.tsx --format junit -o reports/junit/eslint-results.xml --cache",
"lint:typecoverage": "type-coverage --strict -p packages/maskbook --cache --ignore-catch --ignore-files packages/maskbook/src/plugins/Wallet/contracts/** --ignore-files **/__tests__/** --ignore-files **\\__tests__\\** --detail --at-least 98",
"locale-kit": "locale-kit",
"lint": "eslint -c packages/.eslintrc.json packages --ext .ts,.tsx --fix --cache",
"lint:report": "eslint -c packages/.eslintrc.json packages --ext .ts,.tsx --format junit -o reports/junit/eslint-results.xml --cache",
"test": "jest --verbose --watch",
"test:ci": "jest --verbose --ci --collectCoverage=true --reporters=default --reporters=jest-junit -w 1 --forceExit",
"test:e2e": "jest --verbose --runInBand --config=jest-e2e.config.js",
"preinstall": "npx only-allow pnpm",
"ci": "pnpm install --frozen-lockfile --store-dir ~/.pnpm/",
"netlify-install": "test \"$CI\" = true && npx pnpm install -r --store=node_modules/.pnpm-store || echo skiping pnpm install"
"ci": "pnpm install --frozen-lockfile --store-dir ~/.pnpm/"
},
"lint-staged": {
"*": "prettier --check",
"*.{ts,tsx,js,jsx}": "eslint --cache --fix"
"*": "prettier --write --ignore-unknown",
"*.{ts,tsx,js,jsx}": "eslint -c packages/.eslintrc.json --cache --fix",
"packages/maskbook/**/*": "locale-kit --sync-keys --remove-unused-keys"
},
"dependencies": {
"@emotion/cache": "^11",
Expand All @@ -49,8 +46,7 @@
"devDependencies": {
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"@dimensiondev/locale-kit": "workspace:*",
"@dimensiondev/maskbook-cli-dev-or-build": "workspace:*",
"@dimensiondev/cli": "workspace:*",
"@magic-works/commonjs-import.meta": "^1.0.0",
"@magic-works/i18n-codegen": "^0.0.5",
"@material-ui/codemod": "^5.0.0-alpha.24",
Expand All @@ -70,17 +66,16 @@
"prettier": "^2.1.2",
"ts-node": "^9.1.1",
"ttypescript": "^1.5.12",
"type-coverage": "^2.14.8",
"typescript": "4.1.3"
},
"engines": {
"node": ">=14.4.0",
"pnpm": ">=5"
},
"pnpm": {
"overrides": {
"react": "=0.0.0-experimental-dc27b5aaa",
"react-dom": "=0.0.0-experimental-dc27b5aaa"
}
},
"engines": {
"node": ">=14.4.0",
"pnpm": ">=5"
}
}
2 changes: 1 addition & 1 deletion packages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

## Tools

- [cli-dev-build](cli-dev-build)
- [cli](cli)

Because our project is using TypeScript project reference and code generation, to make the build process work normally, those process must run before any other commands.

Expand Down
14 changes: 0 additions & 14 deletions packages/cli-dev-build/build.js

This file was deleted.

17 changes: 0 additions & 17 deletions packages/cli-dev-build/dev.js

This file was deleted.

2 changes: 0 additions & 2 deletions packages/cli-dev-build/gulpfile.js

This file was deleted.

43 changes: 0 additions & 43 deletions packages/cli-dev-build/main.js

This file was deleted.

45 changes: 0 additions & 45 deletions packages/cli-dev-build/netlify.js

This file was deleted.

15 changes: 0 additions & 15 deletions packages/cli-dev-build/package.json

This file was deleted.

25 changes: 0 additions & 25 deletions packages/cli-dev-build/process-lock.js

This file was deleted.

30 changes: 0 additions & 30 deletions packages/cli-dev-build/ts.js

This file was deleted.

1 change: 1 addition & 0 deletions packages/cli/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!/build
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# cli-dev-build
# cli

This package provides two commands: `build` and `dev`.

Expand Down
3 changes: 2 additions & 1 deletion scripts/ci-build.ts → packages/cli/build/build-ci.ts
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env ts-node
import git from '@nice-labs/git-rev'
import { BUILD_PATH, run } from './utils'
import { BUILD_PATH, run } from '../utils'

const branch = git.branchName()
const types = {
Expand Down
Loading

0 comments on commit d0115b4

Please sign in to comment.