From c5860f317455859f47ea9003da6f742bb844aa3b Mon Sep 17 00:00:00 2001 From: CHaBou Date: Sat, 10 Mar 2018 20:56:38 +0100 Subject: [PATCH 1/2] Add name/version to package.json --- package.json | 53 +++++++++++++++++----------------------------------- 1 file changed, 17 insertions(+), 36 deletions(-) diff --git a/package.json b/package.json index 09f5a304..9916ce29 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,8 @@ { + "name": "hyper", + "version": "1.0.0", "repository": "zeit/hyper", + "private": true, "scripts": { "start": "echo 'please run `yarn run dev` in one tab and then `yarn run app` in another one'", "app": "electron app", @@ -12,19 +15,14 @@ "prepush": "yarn test", "postinstall": "electron-builder install-app-deps && yarn run rebuild-node-pty && yarn --cwd node_modules/xterm", "rebuild-node-pty": "electron-rebuild -f -w app/node_modules/node-pty -m app", - "dist": "yarn run build && cross-env BABEL_ENV=production babel --out-file app/renderer/bundle.js --no-comments --minified app/renderer/bundle.js && build", - "clean": "node ./bin/rimraf-standalone.js node_modules && node ./bin/rimraf-standalone.js ./app/node_modules && node ./bin/rimraf-standalone.js ./app/renderer" + "dist": + "yarn run build && cross-env BABEL_ENV=production babel --out-file app/renderer/bundle.js --no-comments --minified app/renderer/bundle.js && build", + "clean": + "node ./bin/rimraf-standalone.js node_modules && node ./bin/rimraf-standalone.js ./app/node_modules && node ./bin/rimraf-standalone.js ./app/renderer" }, "eslintConfig": { - "plugins": [ - "react", - "prettier" - ], - "extends": [ - "eslint:recommended", - "plugin:react/recommended", - "prettier" - ], + "plugins": ["react", "prettier"], + "extends": ["eslint:recommended", "plugin:react/recommended", "prettier"], "parserOptions": { "ecmaVersion": 8, "sourceType": "module", @@ -41,10 +39,7 @@ "node": true }, "rules": { - "func-names": [ - "error", - "as-needed" - ], + "func-names": ["error", "as-needed"], "no-shadow": "error", "no-extra-semi": 0, "react/prop-types": 0, @@ -90,9 +85,7 @@ ] }, "babel": { - "presets": [ - "react" - ], + "presets": ["react"], "env": { "production": { "plugins": [ @@ -129,9 +122,7 @@ { "from": "./build/${os}/", "to": "./bin/", - "filter": [ - "hyper*" - ] + "filter": ["hyper*"] } ], "linux": { @@ -139,28 +130,20 @@ "target": [ { "target": "deb", - "arch": [ - "x64" - ] + "arch": ["x64"] }, { "target": "AppImage", - "arch": [ - "x64" - ] + "arch": ["x64"] }, { "target": "rpm", - "arch": [ - "x64" - ] + "arch": ["x64"] } ] }, "win": { - "target": [ - "squirrel" - ] + "target": ["squirrel"] }, "mac": { "category": "public.app-category.developer-tools", @@ -174,9 +157,7 @@ }, "protocols": { "name": "ssh URL", - "schemes": [ - "ssh" - ] + "schemes": ["ssh"] } }, "license": "MIT", From 6d63c724b8accf0b46b603e670d9f63684dd6841 Mon Sep 17 00:00:00 2001 From: CHaBou Date: Sat, 10 Mar 2018 22:52:55 +0100 Subject: [PATCH 2/2] Add ability to set local plugins directory with an env var --- app/config/paths.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/config/paths.js b/app/config/paths.js index d302791a..68a56c28 100644 --- a/app/config/paths.js +++ b/app/config/paths.js @@ -31,7 +31,7 @@ if (isDev) { const plugins = resolve(cfgDir, '.hyper_plugins'); const plugs = { base: plugins, - local: resolve(plugins, 'local'), + local: process.env.LOCAL_PLUGINS_PATH || resolve(plugins, 'local'), cache: resolve(plugins, 'cache') }; const yarn = resolve(__dirname, '../../bin/yarn-standalone.js');