mirror of
https://github.com/usememos/memos.git
synced 2025-02-11 17:00:54 +01:00
chore: clean package.json
(#993)
* chore: clean `package.json` * chore: update
This commit is contained in:
parent
6c3ff6de63
commit
5b0a54bfb7
15
.github/workflows/frontend-tests.yml
vendored
15
.github/workflows/frontend-tests.yml
vendored
@ -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:
|
||||
|
@ -1,9 +0,0 @@
|
||||
/* eslint-disable no-undef */
|
||||
/** @type {import('ts-jest').JestConfigWithTsJest} */
|
||||
module.exports = {
|
||||
preset: "ts-jest",
|
||||
testEnvironment: "node",
|
||||
moduleNameMapper: {
|
||||
"lodash-es": "lodash",
|
||||
},
|
||||
};
|
@ -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"
|
||||
}
|
||||
|
@ -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()}>
|
||||
|
@ -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>
|
||||
|
@ -1,3 +1,3 @@
|
||||
import * as Icon from "react-feather";
|
||||
import * as Icon from "lucide-react";
|
||||
|
||||
export default Icon;
|
||||
|
@ -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" />
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { last } from "lodash";
|
||||
import { last } from "lodash-es";
|
||||
import store, { useAppSelector } from "..";
|
||||
import { pushDialogStack, popDialogStack, removeDialog } from "../reducer/dialog";
|
||||
|
||||
|
@ -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 "./";
|
||||
|
@ -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,
|
||||
|
2019
web/yarn.lock
2019
web/yarn.lock
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user