Browse Source

reduced bundle size

Eugene Pankov 6 years ago
parent
commit
596d75adc1

+ 2 - 2
.travis.yml

@@ -21,7 +21,7 @@ jobs:
         - yarn run build:typings
         - yarn run build
         - scripts/prepackage-plugins.js
-        - DEBUG=electron-builder scripts/build-linux.js
+        - travis_wait scripts/build-linux.js
 
     - stage: 'Build'
       os: osx
@@ -35,7 +35,7 @@ jobs:
         - yarn run build:typings
         - yarn run build
         - scripts/prepackage-plugins.js
-        - DEBUG=electron-builder scripts/build-macos.js
+        - travis_wait scripts/build-macos.js
 
     - stage: 'Docs'
       os: linux

+ 1 - 1
package.json

@@ -126,7 +126,7 @@
     }
   },
   "scripts": {
-    "build": "webpack --color --config app/webpack.main.config.js && webpack --color --config app/webpack.config.js && webpack --color --config terminus-core/webpack.config.js && webpack --color --config terminus-settings/webpack.config.js && webpack --color --config terminus-terminal/webpack.config.js && webpack --color --config terminus-settings/webpack.config.js && webpack --color --config terminus-plugin-manager/webpack.config.js && webpack --color --config terminus-community-color-schemes/webpack.config.js && webpack --color --config terminus-ssh/webpack.config.js",
+    "build": "webpack --color --config app/webpack.main.config.js && webpack --color --config app/webpack.config.js && webpack --color --config terminus-core/webpack.config.js && webpack --color --config terminus-settings/webpack.config.js && webpack --color --config terminus-terminal/webpack.config.js && webpack --color --config terminus-plugin-manager/webpack.config.js && webpack --color --config terminus-community-color-schemes/webpack.config.js && webpack --color --config terminus-ssh/webpack.config.js",
     "build:typings": "tsc --project terminus-core/tsconfig.typings.json && tsc --project terminus-settings/tsconfig.typings.json && tsc --project terminus-terminal/tsconfig.typings.json && tsc --project terminus-plugin-manager/tsconfig.typings.json && tsc --project terminus-ssh/tsconfig.typings.json",
     "watch": "cross-env TERMINUS_DEV=1 webpack --progress --color --watch",
     "start": "cross-env TERMINUS_DEV=1 electron app --debug",

+ 1 - 2
terminus-community-color-schemes/package.json

@@ -24,6 +24,5 @@
   "devDependencies": {
     "@types/node": "12.0.7",
     "@types/webpack-env": "^1.13.0"
-  },
-  "false": {}
+  }
 }

+ 4 - 6
terminus-core/package.json

@@ -24,12 +24,15 @@
     "axios": "^0.19.0",
     "bootstrap": "^4.1.3",
     "core-js": "^3.1.2",
+    "deepmerge": "^3.2.0",
     "electron-updater": "^4.0.6",
+    "js-yaml": "^3.9.0",
     "mixpanel": "^0.10.2",
     "ng2-dnd": "^5.0.2",
     "ngx-perfect-scrollbar": "^6.0.0",
     "shell-escape": "^0.2.0",
-    "uuid": "^3.3.2"
+    "uuid": "^3.3.2",
+    "winston": "^3.2.1"
   },
   "optionalDependencies": {
     "windows-native-registry": "^1.0.14"
@@ -43,10 +46,5 @@
     "@angular/platform-browser-dynamic": "4.0.1",
     "rxjs": "5.3.0",
     "zone.js": "0.8.4"
-  },
-  "dependencies": {
-    "deepmerge": "^3.2.0",
-    "js-yaml": "^3.9.0",
-    "winston": "^3.2.1"
   }
 }

+ 0 - 4
terminus-core/webpack.config.js

@@ -51,10 +51,6 @@ module.exports = {
     'fs',
     'os',
     'path',
-    'deepmerge',
-    'untildify',
-    'winston',
-    'js-yaml',
     'windows-native-registry',
     /^rxjs/,
     /^@angular/,

+ 3 - 6
terminus-plugin-manager/package.json

@@ -21,7 +21,9 @@
     "@types/node": "12.0.7",
     "@types/semver": "^6.0.0",
     "@types/webpack-env": "1.13.9",
+    "axios": "^0.19.0",
     "css-loader": "^0.28.0",
+    "mz": "^2.6.0",
     "ngx-pipes": "^1.6.1",
     "semver": "^6.1.0"
   },
@@ -34,10 +36,5 @@
     "rxjs": "5.3.0",
     "terminus-core": "*",
     "terminus-settings": "*"
-  },
-  "dependencies": {
-    "axios": "^0.19.0",
-    "mz": "^2.6.0"
-  },
-  "false": {}
+  }
 }

+ 1 - 2
terminus-plugin-manager/webpack.config.js

@@ -43,10 +43,9 @@ module.exports = {
   },
   externals: [
     'fs',
+    'net',
     'npm',
     'path',
-    'mz/fs',
-    'mz/child_process',
     /^rxjs/,
     /^@angular/,
     /^@ng-bootstrap/,

+ 4 - 4
terminus-ssh/package.json

@@ -19,7 +19,9 @@
   "devDependencies": {
     "@types/ssh2": "^0.5.35",
     "@types/webpack-env": "^1.13.0",
-    "ngx-toastr": "^8.0.0"
+    "ngx-toastr": "^8.0.0",
+    "ssh2": "^0.8.2",
+    "ssh2-streams": "^0.4.2"
   },
   "peerDependencies": {
     "@angular/common": "^4.1.3",
@@ -35,8 +37,6 @@
     "windows-process-tree": "^0.2.3"
   },
   "dependencies": {
-    "keytar": "^4.7.0",
-    "ssh2": "^0.8.2",
-    "ssh2-streams": "^0.4.2"
+    "keytar": "^4.7.0"
   }
 }

+ 0 - 2
terminus-ssh/webpack.config.js

@@ -43,8 +43,6 @@ module.exports = {
   },
   externals: [
     'fs',
-    'node-ssh',
-    'ssh2-streams',
     'keytar',
     'path',
     'ngx-toastr',

+ 5 - 5
terminus-terminal/package.json

@@ -25,6 +25,10 @@
     "dataurl": "0.1.0",
     "deep-equal": "1.0.1",
     "file-loader": "^0.11.2",
+    "hterm-umdjs": "1.4.1",
+    "mz": "^2.6.0",
+    "ps-node": "^0.1.6",
+    "runes": "^0.4.2",
     "slug": "^1.1.0",
     "uuid": "^3.3.2",
     "xterm": "https://registry.npmjs.org/@terminus-term/xterm/-/xterm-3.14.1.tgz",
@@ -42,11 +46,7 @@
   },
   "dependencies": {
     "fontmanager-redux": "0.3.2",
-    "hterm-umdjs": "1.4.1",
-    "mz": "^2.6.0",
-    "node-pty": "^0.9.0-beta9",
-    "ps-node": "^0.1.6",
-    "runes": "^0.4.2"
+    "node-pty": "^0.9.0-beta9"
   },
   "optionalDependencies": {
     "@terminus-term/windows-process-tree": "^0.2.4",

+ 1 - 2
terminus-terminal/webpack.config.js

@@ -56,14 +56,13 @@ module.exports = {
     ]
   },
   externals: [
+    'child_process',
     'electron',
     'fontmanager-redux',
     'fs',
     'path',
     'macos-native-processlist',
     'windows-native-registry',
-    'mz/fs',
-    'mz/child_process',
     'node-pty',
     '@terminus-term/windows-process-tree',
     'os',