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"
  }
}
相关推荐
2301_801074159 分钟前
初始ArkUI
javascript·css·html5·arkts
Hong.19481 小时前
vue本地调试设置虚拟域名
前端·javascript·vue.js
童欧巴1 小时前
技术周刊 | 2024 前端趋势解读
前端·javascript·aigc
vvw&1 小时前
使用同一个链接,如何实现PC打开是web应用,手机打开是一个H5应用
开发语言·前端·javascript·智能手机·面试题·每日一道前端面试题
命运之光2 小时前
【经典】抽奖系统(HTML,CSS、JS)
javascript·css·html
IT-sec2 小时前
jquery-picture-cut 任意文件上传(CVE-2018-9208)
android·前端·javascript·安全·web安全·网络安全·jquery
Black蜡笔小新3 小时前
H.265流媒体播放器EasyPlayer.js网页全终端安防视频流媒体播放器可以播放本地视频吗
javascript·音视频·h.265
liuweni3 小时前
Next.js 独立开发教程(三):CSS 样式的完整指南
开发语言·前端·javascript·css·react.js·职场和发展·前端框架
小二·3 小时前
layui树形组件点击树节点后高亮的解决方案
前端·javascript·layui
Minions_Fatman3 小时前
【layui】table的switch、edit修改
前端·javascript·layui