mirror of
https://github.com/ourongxing/newsnow.git
synced 2025-01-19 11:19:14 +08:00
chore: add typecheck
This commit is contained in:
parent
63db52fb9a
commit
175db9bb17
1
.gitignore
vendored
1
.gitignore
vendored
@ -9,3 +9,4 @@ dist/
|
|||||||
.env
|
.env
|
||||||
.env.*
|
.env.*
|
||||||
dev-dist
|
dev-dist
|
||||||
|
*.tsbuildinfo
|
@ -13,12 +13,13 @@
|
|||||||
"homepage": "https://github.com/ourongxing/newsnow",
|
"homepage": "https://github.com/ourongxing/newsnow",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite dev",
|
"dev": "vite dev",
|
||||||
"build": "vite build",
|
"build": "nr typecheck && vite build",
|
||||||
"lint": "eslint",
|
"lint": "eslint",
|
||||||
"favicon": "tsx ./scripts/favicon.ts",
|
"favicon": "tsx ./scripts/favicon.ts",
|
||||||
"start": "PORT=4444 node --env-file .env.server dist/output/server/index.mjs",
|
"start": "PORT=4444 node --env-file .env.server dist/output/server/index.mjs",
|
||||||
"preview": "CF_PAGES=1 pnpm run build && wrangler pages dev",
|
"preview": "CF_PAGES=1 pnpm run build && wrangler pages dev",
|
||||||
"deploy": "CF_PAGES=1 pnpm run build && wrangler pages deploy",
|
"deploy": "CF_PAGES=1 pnpm run build && wrangler pages deploy",
|
||||||
|
"typecheck": "tsc --noEmit -p tsconfig.node.json && tsc --noEmit -p tsconfig.app.json",
|
||||||
"release": "bumpp",
|
"release": "bumpp",
|
||||||
"prepare": "simple-git-hooks",
|
"prepare": "simple-git-hooks",
|
||||||
"log": "wrangler pages deployment tail --project-name newsnow",
|
"log": "wrangler pages deployment tail --project-name newsnow",
|
||||||
|
@ -12,9 +12,9 @@ import { VitePWA } from "vite-plugin-pwa"
|
|||||||
import { projectDir } from "./shared/dir"
|
import { projectDir } from "./shared/dir"
|
||||||
|
|
||||||
const isCF = process.env.CF_PAGES
|
const isCF = process.env.CF_PAGES
|
||||||
|
|
||||||
dotenv.config({
|
dotenv.config({
|
||||||
path: join(projectDir, ".env.server"),
|
path: join(projectDir, ".env.server"),
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const pwaOption: Partial<VitePWAOptions> = {
|
const pwaOption: Partial<VitePWAOptions> = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user