forked from lobehub/lobe-chat
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
169 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
const config = require('@umijs/lint/dist/config/eslint'); | ||
|
||
module.exports = { | ||
...config, | ||
extends: ['plugin:@next/next/recommended'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Release | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
|
||
- name: Setup Node.js environment | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
|
||
- name: Install deps | ||
run: pnpm install | ||
|
||
- name: Test | ||
run: pnpm run test | ||
|
||
- name: release | ||
run: pnpm run release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Test CI | ||
on: [push, pull_request] | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
|
||
- name: Setup Node.js environment | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
|
||
- name: Install deps | ||
run: pnpm install | ||
|
||
- name: lint | ||
run: pnpm run lint | ||
|
||
- name: Test and coverage | ||
run: pnpm run test:coverage | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
|
||
# testing | ||
/coverage | ||
.idea | ||
|
||
# next.js | ||
/.next/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx --no -- commitlint --edit ${1} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx --no-install lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
lockfile=false | ||
resolution-mode=highest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
**/*.svg | ||
.umi | ||
.umi-production | ||
/dist | ||
.dockerignore | ||
.DS_Store | ||
.eslintignore | ||
*.png | ||
*.jpg | ||
*.webp | ||
*.toml | ||
*.py | ||
docker | ||
.editorconfig | ||
Dockerfile* | ||
.gitignore | ||
.prettierignore | ||
LICENSE | ||
.eslintcache | ||
*.lock | ||
yarn-error.log | ||
.idea | ||
.husky | ||
.npmrc | ||
.env.local | ||
.next | ||
__snapshots__ | ||
.snap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module.exports = { | ||
printWidth: 100, | ||
singleQuote: true, | ||
trailingComma: 'all', | ||
proseWrap: 'never', | ||
endOfLine: 'lf', | ||
overrides: [{ files: '.prettierrc', options: { parser: 'json' } }], | ||
plugins: [ | ||
require.resolve('prettier-plugin-packagejson'), | ||
require.resolve('prettier-plugin-organize-imports'), | ||
], | ||
pluginSearchDirs: false, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
extends: ['semantic-release-config-gitmoji'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module.exports = { | ||
extends: ['stylelint-config-recommended', 'stylelint-config-clean-order'], | ||
files: ['*.js', '*.jsx', '*.ts', '*.tsx'], | ||
plugins: ['stylelint-order'], | ||
customSyntax: 'postcss-styled-syntax', | ||
rules: { | ||
'no-empty-source': null, | ||
'no-invalid-double-slash-comments': null, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
extends: ['gitmoji'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,58 @@ | ||
{ | ||
"name": "@lobehub/web", | ||
"name": "lobe-chat", | ||
"version": "1.1.0", | ||
"private": true, | ||
"scripts": { | ||
"build": "next build", | ||
"dev": "next dev", | ||
"lint": "next lint && npm run ts-check", | ||
"lint": "next lint && npm run ts-check && npm run stylelint", | ||
"prepare": "husky install", | ||
"prettier": "prettier -c --write \"**/**\"", | ||
"release": "semantic-release", | ||
"start": "next start", | ||
"stylelint": "stylelint \"src/**/*.{js,jsx,ts,tsx}\" --fix", | ||
"test": "vitest", | ||
"test:coverage": "vitest run --coverage", | ||
"test:update": "vitest -u", | ||
"ts-check": "tsc --noEmit" | ||
}, | ||
"dependencies": { | ||
"@vercel/analytics": "^0.1", | ||
"@vercel/analytics": "^1", | ||
"lobe-ui": "1.0.0", | ||
"next": "^13", | ||
"react": "^18", | ||
"react-dom": "^18" | ||
}, | ||
"devDependencies": { | ||
"@next/eslint-plugin-next": "^13", | ||
"@testing-library/jest-dom": "^5", | ||
"@testing-library/react": "^14", | ||
"@types/chroma-js": "^2", | ||
"@types/lodash.isempty": "^4", | ||
"@types/lodash-es": "^4", | ||
"@types/node": "^18", | ||
"@types/react": "^18", | ||
"@types/react-dom": "^18", | ||
"@types/testing-library__jest-dom": "^5", | ||
"@types/uuid": "^9", | ||
"@umijs/lint": "^4", | ||
"@vitest/coverage-c8": "latest", | ||
"eslint": "^8", | ||
"husky": "^8", | ||
"jsdom": "^21", | ||
"lint-staged": "^13", | ||
"next-pwa": "^5", | ||
"node-fetch": "^3" | ||
"node-fetch": "^3", | ||
"postcss-styled-syntax": "^0.4", | ||
"prettier": "^2", | ||
"prettier-plugin-organize-imports": "^3", | ||
"prettier-plugin-packagejson": "^2", | ||
"semantic-release": "^20", | ||
"semantic-release-config-gitmoji": "^1", | ||
"stylelint": "^15", | ||
"stylelint-config-clean-order": "^5", | ||
"stylelint-config-recommended": "^12", | ||
"stylelint-order": "^6", | ||
"typescript": "^5", | ||
"vitest": "latest" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters