chore: fix npm start

This commit is contained in:
DIYgod
2024-02-26 00:52:44 +08:00
parent d1a4e19c62
commit 8536931e9d
4 changed files with 6 additions and 7 deletions

View File

@@ -1 +1 @@
web: node lib/index.js
web: node lib/index.ts

View File

@@ -20,10 +20,9 @@
"lib"
],
"scripts": {
"build:all": "npm run build && npm run build:radar && npm run build:maintainer",
"build:all": "npm run build:radar && npm run build:maintainer",
"build:maintainer": "node scripts/workflow/build-maintainer.js",
"build:radar": "node scripts/workflow/build-radar.js",
"build": "tsc",
"dev": "cross-env NODE_ENV=dev tsx watch lib/index.ts",
"format": "eslint --cache --fix \"**/*.{ts,js,yml}\" && node website/docs/.format/format.mjs && prettier \"**/*.{ts,js,json}\" --write",
"format:check": "eslint --cache \"**/*.{ts,js,yml}\" && prettier \"**/*.{ts,js,json}\" --check",
@@ -33,8 +32,8 @@
"jest:watch": "cross-env NODE_ENV=test jest --watch",
"lint": "eslint --cache .",
"prepare": "husky || true",
"profiling": "NODE_ENV=production node --prof lib/index.js",
"start": "node lib/index.js",
"profiling": "NODE_ENV=production tsx --prof lib/index.ts",
"start": "tsx lib/index.ts",
"test": "npm run format:check && npm run jest:coverage"
},
"lint-staged": {

View File

@@ -2,7 +2,7 @@
"apps": [
{
"name": "rsshub",
"script": "lib/index.js",
"script": "lib/index.ts",
"instances": "max",
"exec_mode": "cluster",
"env": {

View File

@@ -6,7 +6,7 @@ const { nodeFileTrace } = require('@vercel/nft');
const projectRoot = path.resolve(process.env.PROJECT_ROOT || path.join(__dirname, '../..'));
const resultFolder = path.join(projectRoot, 'app-minimal'); // no need to resolve, ProjectRoot is always absolute
const files = ['lib/index.js', 'api/vercel.js'].map((file) => path.join(projectRoot, file));
const files = ['lib/index.ts', 'api/vercel.js'].map((file) => path.join(projectRoot, file));
(async () => {
console.log('Start analyzing, project root:', projectRoot);