Skip to content

Commit

Permalink
🚚 @verkfi/core
Browse files Browse the repository at this point in the history
  • Loading branch information
neila-a committed Apr 18, 2024
1 parent 4031dd2 commit 14eb2da
Show file tree
Hide file tree
Showing 179 changed files with 178 additions and 164 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pids
*.pid
*.seed
*.pid.lock
app/pages.json
pages.json
prebuild.js
prebuild.mjs

Expand Down
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

4 changes: 2 additions & 2 deletions CONTRIBUTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@

此存储库是一个monorepo存储库。

- app(核心包)
- packages
- verkfi-build(构建扩展的工具的包)
- core(核心包)
- init-tool(创建扩展的工具的包)
- verkfi-tool-\*(工具\*的包)

## zIndex
22 changes: 0 additions & 22 deletions app/pages.json

This file was deleted.

4 changes: 2 additions & 2 deletions crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"files":
[
{
"source": "/app/locales/zh-CN.json",
"translation": "/app/locales/%locale%.json",
"source": "/packages/core/src/app/locales/zh-CN.json",
"translation": "/packages/core/src/app/locales/%locale%.json",
},
],
}
5 changes: 5 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[build.environment]
VERKFI_URL = "https://verkfi.netlify.app"

[build]
package = "/packages/core"
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions package.json → packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "verkfi",
"name": "@verkfi/core",
"version": "1.7.0",
"devVersion": "866",
"dev": true,
Expand Down Expand Up @@ -33,7 +33,7 @@
"@types/dom-to-image": "^2.6.7",
"@types/file-saver": "^2.0.7",
"@types/node": "20.12.7",
"@types/react": "18.2.78",
"@types/react": "18.2.79",
"@types/react-dom": "18.2.25",
"@types/react-transition-group": "^4.4.10",
"@types/three": "^0.163.0",
Expand Down
18 changes: 9 additions & 9 deletions prebuild.ts → packages/core/prebuild.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
/**
* This is a dev-tool only, not for prodcution!
*/
import * as fs from "node:fs";
import pack from "./package.json";
import {
getRepoInfo
} from "components/getRepoInfo";
import {
BuildResult,
Message,
build
} from "esbuild";
import Logger from "lp-logger";
import type {
Manifest
} from "next/dist/lib/metadata/types/manifest-types";
import ChildProcess from "node:child_process";
import {
getRepoInfo
} from "components/getRepoInfo";
import * as fs from "node:fs";
import pack from "./package.json";
const logger = new Logger({
name: "prebuild",
level: "log"
});
import Logger from "lp-logger";
async function devMain() {
const repoInfo = await getRepoInfo();
let commits = Number(ChildProcess.execSync("git log --oneline | wc -l").toString().replace(/\n/g, ""));
Expand All @@ -38,7 +38,7 @@ async function devMain() {
return [oldPackage, oldManifest];
}
async function publicMain() {
const pages = ChildProcess.execSync(`find ./app -name '*page.tsx'`).toString().replaceAll("./app", "").replaceAll("page.tsx", "").split("\n");
const pages = ChildProcess.execSync(`find ./src/app -name '*page.tsx'`).toString().replaceAll("./src/app", "").replaceAll("page.tsx", "").split("\n");
pages.forEach((single, index) => {
if (single !== "/") {
pages[index] = pages[index].substr(0, pages[index].length - 1);
Expand All @@ -55,7 +55,7 @@ async function publicMain() {
}
});
const pagesJSON = JSON.stringify(pages, null, 4);
fs.writeFileSync("./app/pages.json", pagesJSON);
fs.writeFileSync("./src/app/pages.json", pagesJSON);
const logbuild: <T>(result: BuildResult<T>, filename: string) => void = (result, filename) => {
logger.log(`正在编译${filename}……`);
const log = (message: [Message[], string]) => {
Expand All @@ -76,7 +76,7 @@ async function publicMain() {
platform: "node"
}),
ServiceWorker = await build({
entryPoints: ["./app/service-worker.ts"],
entryPoints: ["./src/app/service-worker.ts"],
outfile: "public/service-worker.js",
bundle: true,
minify: true
Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
19 changes: 19 additions & 0 deletions packages/core/public/service-worker.js

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
get
} from 'react-intl-universal';
import pack from "../../package.json";
import pack from "../../../package.json";
import {
AppBar,
Toolbar,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import pack from "../../package.json";
import pack from "../../../package.json";
export async function getRepoInfo() {
const repoInfo: {
name: string;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion app/layout.tsx → packages/core/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export function generateViewport(): Viewport {
};
}
import 'filepond/dist/filepond.min.css'; // Import FilePond styles
import pack from "../package.json";
import pack from "../../package.json";
import {
Box,
GlobalStyles,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
version,
devVersion,
dev
} from "../package.json";
} from "../../package.json";
import db from "db";
import pages from "./pages.json";
/* const toolsTo = [
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
import {
GitHub
} from "@mui/icons-material";
import pack from "../../../package.json";
import pack from "../../../../package.json";
import ErrorBoundary from 'components/ErrorBoundary';
import {
OverridableComponent
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 13 additions & 5 deletions tsconfig.json → packages/core/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,20 @@
"name": "next"
}
],
"baseUrl": "app",
"baseUrl": "src/app",
"paths": {
"dialog/*": ["components/dialog/*Dialog"],
"No": ["components/No"],
"useStoragedState": ["setting/useStoragedState"],
"db": ["setting/db"]
"dialog/*": [
"components/dialog/*Dialog"
],
"No": [
"components/No"
],
"useStoragedState": [
"setting/useStoragedState"
],
"db": [
"setting/db"
]
}
},
"include": [
Expand Down
File renamed without changes
File renamed without changes.
44 changes: 44 additions & 0 deletions packages/tool-demo/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"name": "laz_durno_kkehet",
"to": "demovxt",
"description": "A demo",
"icon": "icon.jpg",
"scripts": {
"build": "rm -f demo.vxt && asar pack ./ demo.vxt"
},
"color": [
"114514",
"191981"
],
"main": "index.html",
"dependencies": {
"@electron/asar": "^3.2.9"
},
"settings": [
{
"type": "boolean",
"page": "theme",
"text": "炸裂",
"id": "bool",
"defaultValue": true
},
{
"type": "input",
"page": "theme",
"text": "炸裂",
"id": "input",
"defaultValue": "炸裂"
},
{
"type": "switch",
"page": "theme",
"switches": [
"boom",
"炸裂switch"
],
"id": "switch",
"text": "炸裂",
"defaultValue": "boom"
}
]
}
File renamed without changes.
44 changes: 0 additions & 44 deletions packages/verkfi-tool-demo/package.json

This file was deleted.

Loading

0 comments on commit 14eb2da

Please sign in to comment.