chore: clean package.json (#993)

* chore: clean `package.json`

* chore: update
This commit is contained in:
boojack 2023-01-26 00:35:50 +08:00 committed by GitHub
parent 6c3ff6de63
commit 5b0a54bfb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 219 additions and 1874 deletions

View File

@ -22,21 +22,6 @@ jobs:
run: yarn lint
working-directory: web
jest-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "18"
cache: yarn
cache-dependency-path: "web/yarn.lock"
- run: yarn
working-directory: web
- name: Run jest
run: yarn test
working-directory: web
frontend-build:
runs-on: ubuntu-latest
steps:

View File

@ -1,9 +0,0 @@
/* eslint-disable no-undef */
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: "ts-jest",
testEnvironment: "node",
moduleNameMapper: {
"lodash-es": "lodash",
},
};

View File

@ -3,8 +3,7 @@
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"lint": "eslint --ext .js,.ts,.tsx, src",
"test": "jest --passWithNoTests"
"lint": "eslint --ext .js,.ts,.tsx, src"
},
"dependencies": {
"@emotion/react": "^11.10.5",
@ -17,11 +16,11 @@
"highlight.js": "^11.6.0",
"i18next": "^21.9.2",
"lodash-es": "^4.17.21",
"lucide-react": "^0.105.0",
"qrcode.react": "^3.1.0",
"qs": "^6.11.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-feather": "^2.0.10",
"react-i18next": "^11.18.6",
"react-redux": "^8.0.1",
"react-router-dom": "^6.4.0",
@ -29,7 +28,6 @@
"tailwindcss": "^3.2.4"
},
"devDependencies": {
"@jest/globals": "^29.1.2",
"@types/lodash-es": "^4.17.5",
"@types/node": "^18.0.3",
"@types/qs": "^6.9.7",
@ -38,20 +36,16 @@
"@types/semver": "^7.3.13",
"@typescript-eslint/eslint-plugin": "^5.6.0",
"@typescript-eslint/parser": "^5.6.0",
"@vitejs/plugin-legacy": "^3.0.1",
"@vitejs/plugin-react-swc": "^3.0.0",
"autoprefixer": "^10.4.2",
"eslint": "^8.4.1",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-config-prettier": "^8.6.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.27.1",
"jest": "^29.1.2",
"less": "^4.1.1",
"lodash": "^4.17.21",
"postcss": "^8.4.5",
"prettier": "2.5.1",
"terser": "^5.16.1",
"ts-jest": "^29.0.3",
"typescript": "^4.3.2",
"vite": "^4.0.0"
}

View File

@ -73,7 +73,7 @@ const DailyReviewDialog: React.FC<Props> = (props: Props) => {
<Icon.ChevronRight className="icon-img" />
</button>
<button className="btn-text share" onClick={handleShareBtnClick}>
<Icon.Share className="icon-img" />
<Icon.Share2 size={16} />
</button>
<span className="split-line">/</span>
<button className="btn-text" onClick={() => props.destroy()}>

View File

@ -17,7 +17,7 @@ const GitHubBadge = () => {
href="https://github.com/usememos/memos"
>
<div className="apply w-auto h-full px-2 flex flex-row justify-center items-center text-xs bg-gray-100 dark:bg-zinc-700">
<Icon.GitHub className="mr-1 w-4 h-4" />
<Icon.Github className="mr-1 w-4 h-4" />
Star
</div>
<div className="w-auto h-full flex flex-row justify-center items-center px-3 text-xs font-bold">{starCount || ""}</div>

View File

@ -1,3 +1,3 @@
import * as Icon from "react-feather";
import * as Icon from "lucide-react";
export default Icon;

View File

@ -1,4 +1,4 @@
import { isNumber, last, toLower, uniq } from "lodash";
import { isNumber, last, toLower, uniq } from "lodash-es";
import React, { useCallback, useEffect, useMemo, useRef, useState } from "react";
import { useTranslation } from "react-i18next";
import { getMatchedNodes } from "../labs/marked";
@ -517,8 +517,8 @@ const MemoEditor = () => {
<Icon.FileText className="icon-img" />
<div className="resource-action-list">
<div className="resource-action-item" onClick={handleUploadFileBtnClick}>
<Icon.Upload className="icon-img" />
<span>{t("editor.local")}</span>
<Icon.Plus className="icon-img" />
<span>{t("common.create")}</span>
</div>
<div className="resource-action-item" onClick={showResourcesSelectorDialog}>
<Icon.Database className="icon-img" />

View File

@ -3,7 +3,7 @@ import { QRCodeSVG } from "qrcode.react";
import React, { useEffect, useRef, useState } from "react";
import { useTranslation } from "react-i18next";
import copy from "copy-to-clipboard";
import { toLower } from "lodash";
import { toLower } from "lodash-es";
import toImage from "../labs/html2image";
import { useGlobalStore, useMemoStore, useUserStore } from "../store/module";
import { VISIBILITY_SELECTOR_ITEMS } from "../helpers/consts";

View File

@ -1,4 +1,4 @@
import { isEqual } from "lodash";
import { isEqual } from "lodash-es";
import { useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
import { useUserStore } from "../store/module";

View File

@ -5,12 +5,12 @@ import { createRoot } from "react-dom/client";
import { Provider } from "react-redux";
import store from "./store";
import App from "./App";
import "./i18n";
import theme from "./theme";
import "./helpers/polyfill";
import "./i18n";
import "dayjs/locale/zh";
import "dayjs/locale/fr";
import "dayjs/locale/vi";
import theme from "./theme";
import "./less/code-highlight.less";
import "./css/global.css";
import "./css/tailwind.css";

View File

@ -1,4 +1,4 @@
import { last } from "lodash";
import { last } from "lodash-es";
import store, { useAppSelector } from "..";
import { pushDialogStack, popDialogStack, removeDialog } from "../reducer/dialog";

View File

@ -1,4 +1,4 @@
import { uniqBy } from "lodash";
import { uniqBy } from "lodash-es";
import * as api from "../../helpers/api";
import { DEFAULT_MEMO_LIMIT } from "../../helpers/consts";
import { useUserStore } from "./";

View File

@ -1,16 +1,10 @@
import { resolve } from "path";
import { defineConfig } from "vite";
import legacy from "@vitejs/plugin-legacy";
import react from "@vitejs/plugin-react-swc";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
react(),
legacy({
targets: ["defaults", "not IE 11"],
}),
],
plugins: [react()],
server: {
host: "0.0.0.0",
port: 3001,
@ -23,10 +17,6 @@ export default defineConfig({
target: "http://localhost:8081/",
changeOrigin: true,
},
"^/h/": {
target: "http://localhost:8081/",
changeOrigin: true,
},
"^/u/\\d*/rss.xml": {
target: "http://localhost:8081/",
changeOrigin: true,

File diff suppressed because it is too large Load Diff