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"
  }
}
相关推荐
还有多远.27 分钟前
jsBridge接入流程
前端·javascript·vue.js·react.js
w2sfot44 分钟前
Passing Arguments as an Object in JavaScript
开发语言·javascript·ecmascript
烛阴1 小时前
【TS 设计模式完全指南】从零到一:掌握TypeScript建造者模式,让你的对象构建链式优雅
javascript·设计模式·typescript
前端Hardy1 小时前
HTML&CSS:有趣的漂流瓶
前端·javascript·css
前端Hardy1 小时前
HTML&CSS :惊艳 UI 必备!卡片堆叠动画
前端·javascript·css
无羡仙2 小时前
替代 Object.freeze 的精准只读模式
前端·javascript
小菜全3 小时前
uniapp新增页面及跳转配置方法
开发语言·前端·javascript·vue.js·前端框架
白水清风3 小时前
关于Js和Ts中类(class)的知识
前端·javascript·面试
前端Hardy3 小时前
只用2行CSS实现响应式布局,比媒体查询更优雅的布局方案
javascript·css·html
小天呐3 小时前
qiankun 微前端接入实战
前端·js·微前端