减少xterm.js演示包的大小

时间:2018-08-23 19:18:32

标签: xtermjs

所以我正在尝试xterm.js演示,这很棒。现在,我想将其与我的应用一起发布。但是,其node_modules文件夹alonse是109MB。对于与应用程序打包而言,这太大了。我还希望避免我的应用程序用户运行npm install,因此我想按原样发送它并以编程方式调用npm start

我可以在不中断终端操作的情况下删除哪个软件包?

这是package.json

{
  "name": "xterm",
  "description": "Full xterm terminal, in your browser",
  "version": "3.6.0",
  "main": "lib/public/Terminal.js",
  "types": "typings/xterm.d.ts",
  "repository": "https://github.com/xtermjs/xterm.js",
  "license": "MIT",
  "devDependencies": {
    "@types/chai": "^3.4.34",
    "@types/glob": "^5.0.35",
    "@types/jsdom": "11.0.1",
    "@types/mocha": "^2.2.33",
    "@types/node": "6.0.108",
    "browserify": "^13.3.0",
    "chai": "3.5.0",
    "concurrently": "^3.5.1",
    "coveralls": "^3.0.1",
    "express": "4.13.4",
    "express-ws": "2.0.0-rc.1",
    "fs-extra": "^1.0.0",
    "glob": "^7.0.5",
    "gulp": "3.9.1",
    "gulp-cli": "^1.2.2",
    "gulp-concat": "^2.6.1",
    "gulp-mocha": "^3.0.1",
    "gulp-sourcemaps": "1.9.1",
    "gulp-typescript": "^3.1.3",
    "gulp-util": "3.0.8",
    "jsdoc": "3.4.3",
    "jsdom": "^11.11.0",
    "merge-stream": "^1.0.1",
    "node-pty": "0.7.6",
    "nodemon": "1.10.2",
    "npm-run-all": "^4.1.2",
    "nyc": "^11.8.0",
    "sorcery": "^0.10.0",
    "source-map-loader": "^0.2.3",
    "tslint": "^5.9.1",
    "tslint-consistent-codestyle": "^1.13.0",
    "typescript": "2.8.3",
    "vinyl-buffer": "^1.0.0",
    "vinyl-source-stream": "^1.1.0",
    "webpack": "^3.10.0",
    "webpack-stream": "^4.0.0",
    "zmodem.js": "^0.1.5"
  },
  "scripts": {
    "start": "concurrently --kill-others-on-fail --names \"demo,server\" \"gulp watch-demo\" \"node demo/app\"",
    "start-zmodem": "node demo/zmodem/app",
    "lint": "tslint 'src/**/*.ts'",
    "test": "npm-run-all mocha lint",
    "test-debug": "node --inspect-brk node_modules/.bin/gulp test",
    "test-suite": "gulp mocha-suite --test",
    "test-coverage": "nyc -x gulpfile.js -x '**/*test*' npm run mocha",
    "mocha": "gulp test",
    "build:docs": "jsdoc -c jsdoc.json",
    "tsc": "tsc",
    "prebuild": "concurrently --kill-others-on-fail --names \"lib,attach,fit,fullscreen,search,terminado,webLinks,winptyCompat,zmodem,css\" \"tsc\" \"tsc -p ./src/addons/attach\" \"tsc -p ./src/addons/fit\" \"tsc -p ./src/addons/fullscreen\" \"tsc -p ./src/addons/search\" \"tsc -p ./src/addons/terminado\" \"tsc -p ./src/addons/webLinks\" \"tsc -p ./src/addons/winptyCompat\" \"tsc -p ./src/addons/zmodem\" \"gulp css\"",
    "build": "gulp build",
    "prepublish": "npm run build",
    "coveralls": "nyc report --reporter=text-lcov | coveralls",
    "webpack": "gulp webpack",
    "watch": "concurrently --kill-others-on-fail --names \"lib,attach,fit,fullscreen,search,terminado,webLinks,winptyCompat,zmodem,css\" \"tsc -w\" \"tsc -w -p ./src/addons/attach\" \"tsc -w -p ./src/addons/fit\" \"tsc -w -p ./src/addons/fullscreen\" \"tsc -w -p ./src/addons/search\" \"tsc -w -p ./src/addons/terminado\" \"tsc -w -p ./src/addons/webLinks\" \"tsc -w -p ./src/addons/winptyCompat\" \"tsc -w -p ./src/addons/zmodem\" \"gulp watch-css\""
  }
}

以下是尺寸

enter image description here

0 个答案:

没有答案