-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
0 parents
commit 7899fdf
Showing
32 changed files
with
712 additions
and
0 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 @@ | ||
module.exports = require('@lobehub/lint').changelog; |
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 @@ | ||
module.exports = require('@lobehub/lint').commitlint; |
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,47 @@ | ||
import { defineConfig } from 'dumi'; | ||
import { Github } from 'lucide-react'; | ||
|
||
import { homepage } from './package.json'; | ||
|
||
const themeConfig = { | ||
actions: [ | ||
{ | ||
icon: Github, | ||
link: homepage, | ||
openExternal: true, | ||
text: 'Github', | ||
}, | ||
{ | ||
link: '/components/action-icon', | ||
text: 'Get Started', | ||
type: 'primary', | ||
}, | ||
], | ||
footer: 'Made with 🤯 by LobeHub', | ||
name: 'Realtime Weather', | ||
socialLinks: { | ||
discord: 'https://discord.gg/AYFPHvv2jT', | ||
github: homepage, | ||
}, | ||
}; | ||
|
||
export default defineConfig({ | ||
extraBabelPlugins: ['babel-plugin-antd-style'], | ||
favicons: [ | ||
'https://registry.npmmirror.com/@lobehub/assets-emoji/1.3.0/files/assets/rainbow.webp', | ||
], | ||
// locales: [{ id: 'en-US', name: 'English' }], | ||
mfsu: {}, | ||
npmClient: 'pnpm', | ||
outputPath: 'docs-dist', | ||
// ssr: isProduction ? {} : false, | ||
styles: [ | ||
`html, body { background: transparent; } | ||
@media (prefers-color-scheme: dark) { | ||
html, body { background: #000; } | ||
}`, | ||
], | ||
themeConfig, | ||
title: 'RealTime Weather - Lobe Chat Plugin', | ||
}); |
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,16 @@ | ||
# http://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 | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[Makefile] | ||
indent_style = tab |
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,8 @@ | ||
/lambda/ | ||
/scripts | ||
/config | ||
.history | ||
public | ||
dist | ||
.umi | ||
mock |
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 @@ | ||
const config = require('@lobehub/lint').eslint; | ||
|
||
module.exports = config; |
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,19 @@ | ||
import { defineConfig } from 'father'; | ||
|
||
export default defineConfig({ | ||
umd: { | ||
output: { path: 'dist', filename: 'index' }, | ||
externals: { | ||
'react': 'React', | ||
'react-dom': 'ReactDOM', | ||
'antd': 'antd', | ||
'antd-style': 'antd-style', | ||
}, | ||
|
||
chainWebpack: (memo) => { | ||
// use https://github.com/systemjs/systemjs to dynamic load | ||
memo.output.libraryTarget('system'); | ||
return memo; | ||
}, | ||
}, | ||
}); |
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,60 @@ | ||
name: Release CI | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- alpha | ||
- beta | ||
- rc | ||
|
||
jobs: | ||
test: | ||
name: 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 && pnpm run doctor | ||
|
||
- name: Test | ||
run: pnpm run test | ||
|
||
release: | ||
needs: test | ||
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: release | ||
run: pnpm run release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_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,28 @@ | ||
name: Test | ||
on: [push] | ||
|
||
jobs: | ||
test: | ||
name: 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: '20' | ||
|
||
- name: Install deps | ||
run: pnpm install | ||
|
||
- 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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
**/node_modules | ||
# roadhog-api-doc ignore | ||
/src/utils/request-temp.js | ||
_roadhog-api-doc | ||
|
||
# production | ||
/dist | ||
/.vscode | ||
|
||
# misc | ||
.DS_Store | ||
npm-debug.log* | ||
yarn-error.log | ||
|
||
/coverage | ||
.idea | ||
package-lock.json | ||
*bak | ||
.vscode | ||
|
||
# visual studio code | ||
.history | ||
*.log | ||
functions/* | ||
.temp/** | ||
|
||
# umi | ||
.umi | ||
.umi-production | ||
|
||
# screenshot | ||
screenshot | ||
.firebase | ||
.eslintcache | ||
|
||
build | ||
|
||
.env | ||
|
||
.vercel | ||
.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,11 @@ | ||
lockfile=false | ||
resolution-mode=highest | ||
public-hoist-pattern[]=*@umijs/lint* | ||
public-hoist-pattern[]=*changelog* | ||
public-hoist-pattern[]=*commitlint* | ||
public-hoist-pattern[]=*eslint* | ||
public-hoist-pattern[]=*postcss* | ||
public-hoist-pattern[]=*prettier* | ||
public-hoist-pattern[]=*remark* | ||
public-hoist-pattern[]=*semantic-release* | ||
public-hoist-pattern[]=*stylelint* |
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,23 @@ | ||
**/*.svg | ||
**/*.ejs | ||
.umi | ||
.umi-production | ||
/dist | ||
.dockerignore | ||
.DS_Store | ||
.eslintignore | ||
*.png | ||
*.toml | ||
docker | ||
.editorconfig | ||
Dockerfile* | ||
.gitignore | ||
.prettierignore | ||
LICENSE | ||
.eslintcache | ||
*.lock | ||
yarn-error.log | ||
.history | ||
CNAME | ||
/build | ||
/public |
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 @@ | ||
module.exports = require('@lobehub/lint').prettier; |
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 @@ | ||
module.exports = require('@lobehub/lint').semanticRelease; |
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 @@ | ||
module.exports = require('@lobehub/lint').remarklint; |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 LobeHub | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Oops, something went wrong.