mirror of
https://github.com/aykhans/slash-e.git
synced 2025-04-18 21:19:44 +00:00
chore: fix frontend build
This commit is contained in:
parent
f5817c575c
commit
efc3815edf
1
.dockerignore
Normal file
1
.dockerignore
Normal file
@ -0,0 +1 @@
|
|||||||
|
*/*/node_modules
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -4,9 +4,6 @@
|
|||||||
# temp folder
|
# temp folder
|
||||||
tmp
|
tmp
|
||||||
|
|
||||||
# Frontend asset
|
|
||||||
web/dist
|
|
||||||
|
|
||||||
# build folder
|
# build folder
|
||||||
build
|
build
|
||||||
|
|
||||||
|
@ -2,12 +2,12 @@
|
|||||||
FROM node:18.12.1-alpine3.16 AS frontend
|
FROM node:18.12.1-alpine3.16 AS frontend
|
||||||
WORKDIR /frontend-build
|
WORKDIR /frontend-build
|
||||||
|
|
||||||
COPY ./frontend/web/package.json ./frontend/web/pnpm-lock.yaml ./
|
COPY ./frontend/ .
|
||||||
|
|
||||||
|
WORKDIR /frontend-build/web
|
||||||
|
|
||||||
RUN corepack enable && pnpm i --frozen-lockfile
|
RUN corepack enable && pnpm i --frozen-lockfile
|
||||||
|
|
||||||
COPY ./frontend/web/ .
|
|
||||||
|
|
||||||
RUN pnpm build
|
RUN pnpm build
|
||||||
|
|
||||||
# Build backend exec file.
|
# Build backend exec file.
|
||||||
@ -15,7 +15,7 @@ FROM golang:1.19.3-alpine3.16 AS backend
|
|||||||
WORKDIR /backend-build
|
WORKDIR /backend-build
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
COPY --from=frontend /frontend-build/dist ./server/dist
|
COPY --from=frontend /frontend-build/web/dist ./server/dist
|
||||||
|
|
||||||
RUN CGO_ENABLED=0 go build -o slash ./cmd/slash/main.go
|
RUN CGO_ENABLED=0 go build -o slash ./cmd/slash/main.go
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { Shortcut } from "../../types/proto/api/v2/shortcut_service_pb";
|
import type { Shortcut } from "@pbtypes/proto/api/v2/shortcut_service_pb";
|
||||||
import { Storage } from "@plasmohq/storage";
|
import { Storage } from "@plasmohq/storage";
|
||||||
|
|
||||||
const storage = new Storage();
|
const storage = new Storage();
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { Button, IconButton, Input, Modal, ModalDialog } from "@mui/joy";
|
import { Button, IconButton, Input, Modal, ModalDialog } from "@mui/joy";
|
||||||
|
import { CreateShortcutResponse, OpenGraphMetadata, Visibility } from "@pbtypes/proto/api/v2/shortcut_service_pb";
|
||||||
import { useStorage } from "@plasmohq/storage/hook";
|
import { useStorage } from "@plasmohq/storage/hook";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { toast } from "react-hot-toast";
|
import { toast } from "react-hot-toast";
|
||||||
import { CreateShortcutResponse, OpenGraphMetadata, Visibility } from "../../../types/proto/api/v2/shortcut_service_pb";
|
|
||||||
import Icon from "./Icon";
|
import Icon from "./Icon";
|
||||||
|
|
||||||
const generateTempName = (length = 6) => {
|
const generateTempName = (length = 6) => {
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { IconButton } from "@mui/joy";
|
import { IconButton } from "@mui/joy";
|
||||||
|
import { ListShortcutsResponse } from "@pbtypes/proto/api/v2/shortcut_service_pb";
|
||||||
import { useStorage } from "@plasmohq/storage/hook";
|
import { useStorage } from "@plasmohq/storage/hook";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
import { toast } from "react-hot-toast";
|
import { toast } from "react-hot-toast";
|
||||||
import { ListShortcutsResponse } from "../../../types/proto/api/v2/shortcut_service_pb";
|
|
||||||
import Icon from "./Icon";
|
import Icon from "./Icon";
|
||||||
|
|
||||||
const PullShortcutsButton = () => {
|
const PullShortcutsButton = () => {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { Shortcut } from "../../../types/proto/api/v2/shortcut_service_pb";
|
import type { Shortcut } from "@pbtypes/proto/api/v2/shortcut_service_pb";
|
||||||
import { useStorage } from "@plasmohq/storage/hook";
|
import { useStorage } from "@plasmohq/storage/hook";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { Shortcut } from "../../../types/proto/api/v2/shortcut_service_pb";
|
import type { Shortcut } from "@pbtypes/proto/api/v2/shortcut_service_pb";
|
||||||
import { useStorage } from "@plasmohq/storage/hook";
|
import { useStorage } from "@plasmohq/storage/hook";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import ShortcutView from "./ShortcutView";
|
import ShortcutView from "./ShortcutView";
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import type { Shortcut } from "../../types/proto/api/v2/shortcut_service_pb";
|
|
||||||
import { Button, Divider, Input } from "@mui/joy";
|
import { Button, Divider, Input } from "@mui/joy";
|
||||||
|
import type { Shortcut } from "@pbtypes/proto/api/v2/shortcut_service_pb";
|
||||||
import { useStorage } from "@plasmohq/storage/hook";
|
import { useStorage } from "@plasmohq/storage/hook";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { Toaster, toast } from "react-hot-toast";
|
import { Toaster, toast } from "react-hot-toast";
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import type { Shortcut } from "../../types/proto/api/v2/shortcut_service_pb";
|
|
||||||
import { Button, Divider, IconButton } from "@mui/joy";
|
import { Button, Divider, IconButton } from "@mui/joy";
|
||||||
|
import type { Shortcut } from "@pbtypes/proto/api/v2/shortcut_service_pb";
|
||||||
import { useStorage } from "@plasmohq/storage/hook";
|
import { useStorage } from "@plasmohq/storage/hook";
|
||||||
import { Toaster } from "react-hot-toast";
|
import { Toaster } from "react-hot-toast";
|
||||||
import CreateShortcutsButton from "@/components/CreateShortcutsButton";
|
import CreateShortcutsButton from "@/components/CreateShortcutsButton";
|
||||||
|
@ -6,12 +6,16 @@
|
|||||||
"include": [
|
"include": [
|
||||||
".plasmo/index.d.ts",
|
".plasmo/index.d.ts",
|
||||||
"./**/*.ts",
|
"./**/*.ts",
|
||||||
"./**/*.tsx"
|
"./**/*.tsx",
|
||||||
|
"../types"
|
||||||
],
|
],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"paths": {
|
"paths": {
|
||||||
"@/*": [
|
"@/*": [
|
||||||
"./src/*"
|
"./src/*"
|
||||||
|
],
|
||||||
|
"@pbtypes/*": [
|
||||||
|
"../types/*"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"baseUrl": "."
|
"baseUrl": "."
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { Button, IconButton } from "@mui/joy";
|
import { Button, IconButton } from "@mui/joy";
|
||||||
|
import { ListUserAccessTokensResponse, UserAccessToken } from "@pbtypes/proto/api/v2/user_service_pb";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import copy from "copy-to-clipboard";
|
import copy from "copy-to-clipboard";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { toast } from "react-hot-toast";
|
import { toast } from "react-hot-toast";
|
||||||
import { ListUserAccessTokensResponse, UserAccessToken } from "../../../../types/proto/api/v2/user_service_pb";
|
|
||||||
import useUserStore from "../../stores/v1/user";
|
import useUserStore from "../../stores/v1/user";
|
||||||
import { showCommonDialog } from "../Alert";
|
import { showCommonDialog } from "../Alert";
|
||||||
import CreateAccessTokenDialog from "../CreateAccessTokenDialog";
|
import CreateAccessTokenDialog from "../CreateAccessTokenDialog";
|
||||||
|
@ -14,7 +14,16 @@
|
|||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"isolatedModules": true,
|
"isolatedModules": true,
|
||||||
"noEmit": true,
|
"noEmit": true,
|
||||||
"jsx": "react-jsx"
|
"jsx": "react-jsx",
|
||||||
|
"paths": {
|
||||||
|
"@/*": [
|
||||||
|
"./src/*"
|
||||||
|
],
|
||||||
|
"@pbtypes/*": [
|
||||||
|
"../types/*"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"include": ["./src"]
|
"baseUrl": "."
|
||||||
|
},
|
||||||
|
"include": ["./src", "../types"]
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ tmp_dir = ".air"
|
|||||||
bin = "./.air/slash --mode dev"
|
bin = "./.air/slash --mode dev"
|
||||||
cmd = "go build -o ./.air/slash ./cmd/slash/main.go"
|
cmd = "go build -o ./.air/slash ./cmd/slash/main.go"
|
||||||
delay = 1000
|
delay = 1000
|
||||||
exclude_dir = [".air", "web", "extension", "frontend", "build"]
|
exclude_dir = [".air", "frontend", "build"]
|
||||||
exclude_file = []
|
exclude_file = []
|
||||||
exclude_regex = []
|
exclude_regex = []
|
||||||
exclude_unchanged = false
|
exclude_unchanged = false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user