Skip to content

Commit

Permalink
✨ feat: Add Dify, Poe, Cursor, MyShell, DeepAI and Tiangong
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 committed Nov 27, 2024
1 parent 928d0d9 commit 6d50760
Show file tree
Hide file tree
Showing 368 changed files with 3,079 additions and 1,235 deletions.
16 changes: 15 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1 +1,15 @@
module.exports = require('@lobehub/lint').eslint;
const config = require('@lobehub/lint').eslint;

module.exports = {
...config,
rules: {
...config.rules,
'react/self-closing-comp': [
'error',
{
component: true,
html: true,
},
],
},
};
7 changes: 3 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ jobs:
- name: Test
run: bun run test

- name: Build Toc
run: bun run build:toc

- name: Build
run: bun run build

Expand All @@ -41,7 +38,9 @@ jobs:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Build Static
run: bun run build:static
run: |-
bun run build:static
bun run sync:md
- name: Commit changes
run: |-
Expand Down
1 change: 0 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env sh

npm run sync:md
git add .
npm run type-check
npx --no-install lint-staged
7 changes: 6 additions & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
module.exports = require('@lobehub/lint').prettier;
const config = require('@lobehub/lint').prettier;

module.exports = {
...config,
htmlWhitespaceSensitivity: 'ignore',
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"es"
],
"scripts": {
"build": "father build",
"build": "npm run build:toc && father build",
"build:static": "tsx scripts/svgWorkflow/index.ts",
"build:toc": "tsx scripts/tocWorkflow/index.ts",
"build:watch": "father dev",
Expand Down
Binary file added packages/static-png/dark/dify-color.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/static-png/dark/dify-text.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/static-png/dark/dify.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/static-png/light/comfyui-color.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/static-png/light/dify-color.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/static-png/light/dify-text.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/static-png/light/dify.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/static-svg/icons/comfyui-color.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/static-svg/icons/dify-color.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/static-svg/icons/dify-text.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/static-svg/icons/dify.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/static-webp/dark/dify-color.webp
Binary file not shown.
Binary file added packages/static-webp/dark/dify-text.webp
Binary file not shown.
Binary file added packages/static-webp/dark/dify.webp
Binary file not shown.
Binary file modified packages/static-webp/light/comfyui-color.webp
Binary file not shown.
Binary file added packages/static-webp/light/dify-color.webp
Binary file not shown.
Binary file added packages/static-webp/light/dify-text.webp
Binary file not shown.
Binary file added packages/static-webp/light/dify.webp
Binary file not shown.
9 changes: 7 additions & 2 deletions scripts/svgWorkflow/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ const themeColors = {
};

class SvgWorkflow {
ignoreList = ['dify.svg', 'dify-color.svg'];

exportSvg(Component: ComponentType, outputFileName: string): void {
const svgString = renderToStaticMarkup(createElement(Component));
const svgContent = svgString.match(/<svg[^>]*>[\S\s]*<\/svg>/i)?.[0];
Expand Down Expand Up @@ -81,6 +83,9 @@ class SvgWorkflow {
if (Icon?.Text) {
this.exportSvg(Icon.Text, `${key.toLowerCase()}-text`);
}
if (Icon?.TextColor) {
this.exportSvg(Icon.TextColor, `${key.toLowerCase()}-text-color`);
}
if (Icon?.TextCn) {
this.exportSvg(Icon.TextCn, `${key.toLowerCase()}-text-cn`);
}
Expand All @@ -100,7 +105,7 @@ class SvgWorkflow {
await pMap(
readdirSync(outputDir),
async (file) => {
if (file.endsWith('.svg')) {
if (file.endsWith('.svg') && !this.ignoreList.includes(file)) {
const svgPath = resolve(outputDir, file);
const pngLightPath = resolve(outputPngDir, 'light', file.replace('.svg', '.png'));
const pngDarkPath = resolve(outputPngDir, 'dark', file.replace('.svg', '.png'));
Expand All @@ -116,7 +121,7 @@ class SvgWorkflow {
await pMap(
readdirSync(outputDir),
async (file) => {
if (file.endsWith('.svg')) {
if (file.endsWith('.svg') && !this.ignoreList.includes(file)) {
const svgPath = resolve(outputDir, file);
const webpLightPath = resolve(outputWebpDir, 'light', file.replace('.svg', '.webp'));
const webpDarkPath = resolve(outputWebpDir, 'dark', file.replace('.svg', '.webp'));
Expand Down
Loading

0 comments on commit 6d50760

Please sign in to comment.