nodejs开发环境搭建示例

服务与后端

javascript 复制代码
{
    "name": "AsaiCC",
    "private": true,
    "version": "1.0.0",
    "description": "",
    "main": "main.js",
    "bin": "index.js",
    "author": "",
    "license": "ISC",
    "scripts": {
        "dev": "ts-node-dev --respawn app.ts",
        "server": "node ./index.js",
        "tsc": "tsc app.ts",
        "format": "prettier --write src/",
        "ncc": "npm run tsc && ncc build ./app.js -m -o ./",
        "pkgserver": "npm run ncc && pkg -t win ./index.js -o ./_AsaiCCServer",
        "pkg": "npm run ncc && pkg -t win package.json -o ./_AsaiCC",
        "pkglinux": "npm run ncc && pkg -t linux package.json -o ./_AsaiCClinux",
        "build": "npm run pkg",
        "lib": "tsc ./src/install/Index.ts && ncc build ./src/install/Index.js -o ./src/lib/",
        "start": "electron .",
        "package": "electron-packager ./ AsaiCC --asar --overwrite --platform=win32 --arch=x64 --out=./dist-exe --electron-version=17.1.1 --ignore=node_modules --ignore=src --ignore=app --ignore=index",
        "packageopen": "electron-packager ./ AsaiCC --overwrite --platform=win32 --arch=x64 --out=./dist-exe --electron-version=17.1.1 --ignore=node_modules --ignore=src --ignore=app --ignore=index",
        "test": "echo \"Error: no test specified\" && exit 1"
    },
    "win": {
        "target": "nsis",
        "icon": "favicon.ico"
    },
    "nsis": {
        "oneClick": false,
        "allowElevation": true,
        "allowToChangeInstallationDirectory": true,
        "createDesktopShortcut": true,
        "createStartMenuShortcut": true,
        "installerIcon": "favicon.ico",
        "uninstallerIcon": "favicon.ico",
        "installerHeader": "./favicon.ico",
        "installerHeaderIcon": "./favicon.ico"
    },
    "pkg": {
        "assets": [
            "./web-client/**/*"
        ]
    },
    "dependencies": {
        "koa": "^2.14.1",
        "koa-router": "^12.0.0",
        "koa-static": "^5.0.0",
        "portfinder": "^1.0.32"
    },
    "devDependencies": {
        "@types/koa": "^2.13.5",
        "@types/node": "^18.15.3",
        "@vercel/ncc": "^0.36.1",
        "electron": "^23.2.1",
        "electron-packager": "^17.1.1",
        "pkg": "^5.8.1",
        "ts-node-dev": "^2.0.0",
        "typescript": "^5.0.2"
    }
}

前端

javascript 复制代码
{
  "name": "asai-front",
  "private": true,
  "version": "0.0.0",
  "scripts": {
    "dev": "vite",
    "build": "vue-tsc && vite build",
    "preview": "vite preview"
  },
  "dependencies": {
    "@element-plus/icons-vue": "^2.1.0",
    "@tweenjs/tween.js": "^18.6.4",
    "axios": "^1.4.0",
    "element-plus": "^2.3.9",
    "lodash": "^4.17.21",
    "monaco-editor": "^0.36.1",
    "pinia": "^2.1.6",
    "three": "^0.150.1",
    "tweenjs": "^1.0.2",
    "vue": "^3.3.4",
    "vue-router": "^4.2.4"
  },
  "devDependencies": {
    "@types/node": "^20.5.2",
    "@types/three": "^0.149.0",
    "@vitejs/plugin-vue": "^4.3.3",
    "collect.js": "^4.36.1",
    "sass": "^1.66.1",
    "typescript": "^5.1.6",
    "vite": "^4.4.9",
    "vite-plugin-monaco-editor": "^1.1.0",
    "vue-tsc": "^1.8.8"
  }
}
相关推荐
古蓬莱掌管玉米的神9 小时前
vue3语法watch与watchEffect
前端·javascript
拉一次撑死狗9 小时前
Vue基础(2)
前端·javascript·vue.js
qq_5443291710 小时前
下载一个项目到跑通的大致过程是什么?
javascript·学习·bug
Jane - UTS 数据传输系统13 小时前
VUE+ Element-plus , el-tree 修改默认左侧三角图标,并使没有子级的那一项不展示图标
javascript·vue.js·elementui
ThomasChan12315 小时前
Typescript 多个泛型参数详细解读
前端·javascript·vue.js·typescript·vue·reactjs·js
zzlyx9915 小时前
.NET 9 微软官方推荐使用 Scalar 替代传统的 Swagger
javascript·microsoft·.net
Bunury15 小时前
组件封装-List
javascript·数据结构·list
我命由我1234515 小时前
NPM 与 Node.js 版本兼容问题:npm warn cli npm does not support Node.js
前端·javascript·前端框架·npm·node.js·html5·js
Orange30151116 小时前
【自己动手开发Webpack插件:开启前端构建工具的个性化定制之旅】
前端·javascript·webpack·typescript·node.js
Jacob程序员18 小时前
leaflet绘制室内平面图
android·开发语言·javascript