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"
  }
}
相关推荐
清灵xmf1 小时前
在 Vue 中实现与优化轮询技术
前端·javascript·vue·轮询
薛一半2 小时前
PC端查看历史消息,鼠标向上滚动加载数据时页面停留在上次查看的位置
前端·javascript·vue.js
过期的H2O22 小时前
【H2O2|全栈】JS进阶知识(四)Ajax
开发语言·javascript·ajax
MarcoPage2 小时前
第十九课 Vue组件中的方法
前端·javascript·vue.js
你好龙卷风!!!3 小时前
vue3 怎么判断数据列是否包某一列名
前端·javascript·vue.js
shenweihong4 小时前
javascript实现md5算法(支持微信小程序),可分多次计算
javascript·算法·微信小程序
巧克力小猫猿5 小时前
基于ant组件库挑选框组件-封装滚动刷新的分页挑选框
前端·javascript·vue.js
嚣张农民5 小时前
一文简单看懂Promise实现原理
前端·javascript·面试
迃-幵6 小时前
力扣:225 用队列实现栈
android·javascript·leetcode
s甜甜的学习之旅6 小时前
前端js处理list(数组)
开发语言·前端·javascript