diff --git a/.flowconfig b/.flowconfig deleted file mode 100644 index 3c2a132..0000000 --- a/.flowconfig +++ /dev/null @@ -1,26 +0,0 @@ -[ignore] -/app/main.prod.js -/app/main.prod.js.map -/app/dist/.* -/resources/.* -/node_modules/webpack-cli -/release/.* -/dll/.* -/release/.* -/git/.* - -[include] - -[libs] - -[options] -esproposal.class_static_fields=enable -esproposal.class_instance_fields=enable -esproposal.export_star_as=enable -module.name_mapper.extension='css' -> '/internals/flow/CSSModule.js.flow' -module.name_mapper.extension='styl' -> '/internals/flow/CSSModule.js.flow' -module.name_mapper.extension='scss' -> '/internals/flow/CSSModule.js.flow' -module.name_mapper.extension='png' -> '/internals/flow/WebpackAsset.js.flow' -module.name_mapper.extension='jpg' -> '/internals/flow/WebpackAsset.js.flow' -suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe -suppress_comment=\\(.\\|\n\\)*\\$FlowIssue diff --git a/.prettierrc.json b/.prettierrc.json deleted file mode 100644 index 49a0a30..0000000 --- a/.prettierrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "overrides": [ - { - "files": [".prettierrc", ".babelrc", ".eslintrc", ".stylelintrc"], - "options": { - "parser": "json" - } - } - ], - "singleQuote": true -} - \ No newline at end of file diff --git a/.testcafe-electron-rc b/.testcafe-electron-rc deleted file mode 100644 index d261385..0000000 --- a/.testcafe-electron-rc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "mainWindowUrl": "./app/app.html", - "appPath": "." -} diff --git a/config/default.json b/config/default.json new file mode 100644 index 0000000..d1b67f4 --- /dev/null +++ b/config/default.json @@ -0,0 +1,6 @@ +{ + "DOWNLOAD_ECHO_NODE_URLS": { + "MAC": "https://d14s13k07yt1gw.cloudfront.net/echo-mac.0.13.5.tar", + "LINUX": "https://d14s13k07yt1gw.cloudfront.net/echo-linux.0.13.5.tar" + } +} \ No newline at end of file diff --git a/flow-typed/module_vx.x.x.js b/flow-typed/module_vx.x.x.js deleted file mode 100644 index d15de7d..0000000 --- a/flow-typed/module_vx.x.x.js +++ /dev/null @@ -1 +0,0 @@ -/* eslint-disable */ diff --git a/internals/flow/CSSModule.js.flow b/internals/flow/CSSModule.js.flow deleted file mode 100644 index 6bd2a54..0000000 --- a/internals/flow/CSSModule.js.flow +++ /dev/null @@ -1,3 +0,0 @@ -// @flow - -declare export default { [key: string]: string } \ No newline at end of file diff --git a/internals/flow/WebpackAsset.js.flow b/internals/flow/WebpackAsset.js.flow deleted file mode 100644 index 37d49d3..0000000 --- a/internals/flow/WebpackAsset.js.flow +++ /dev/null @@ -1,2 +0,0 @@ -// @flow -declare export default string diff --git a/internals/scripts/CheckYarn.js b/internals/scripts/CheckYarn.js deleted file mode 100644 index 3359c3e..0000000 --- a/internals/scripts/CheckYarn.js +++ /dev/null @@ -1,7 +0,0 @@ -// @flow -/* eslint-disable */ -if (!/yarn\.js$/.test(process.env.npm_execpath || '')) { - console.warn( - "\u001b[33mYou don't seem to be using yarn. This could produce unexpected results.\u001b[39m", - ); -} diff --git a/internals/scripts/DownloadBuild.js b/internals/scripts/DownloadBuild.js index 8045c5b..fdae3e7 100644 --- a/internals/scripts/DownloadBuild.js +++ b/internals/scripts/DownloadBuild.js @@ -3,6 +3,7 @@ import fs from "fs"; import download from "download"; import { parse } from "url"; import tar from "tar"; +import config from "config"; /** * @@ -53,13 +54,12 @@ const downloadBuild = async (url, os, filename) => { try { - const downloadUrl = process.env.DOWNLOAD_ECHO_NODE_URL; const downloadOS = process.env.DOWNLOAD_ECHO_NODE_OS; + const downloadUrl = process.env.DOWNLOAD_ECHO_NODE_URL || config.DOWNLOAD_ECHO_NODE_URLS[downloadOS.toUpperCase()]; if (!downloadUrl) { - throw new Error('You need to set process.env.DOWNLOAD_ECHO_NODE_URL'); - process.exit(1); + throw new Error('You need to set process.env.DOWNLOAD_ECHO_NODE_URL'); } if (!downloadOS) { diff --git a/package.json b/package.json index 533b509..3898169 100644 --- a/package.json +++ b/package.json @@ -4,16 +4,14 @@ "version": "0.8.0-rc.1", "description": "Blip Wallet", "scripts": { - "web": "cross-env NODE_ENV=development node --trace-warnings -r @babel/register ./node_modules/webpack-dev-server/bin/webpack-dev-server --config configs/webpack.config.web.babel.js --mode development --progress --colors --history-api-fallback --hot --inline", - "build-web": "cross-env NODE_ENV=production webpack -r @babel/register --progress --display-error-details --colors --mode production --config configs/webpack.config.web.babel.js", + "web": "cross-env NODE_ENV=development node --trace-warnings -r @babel/register ./node_modules/webpack-dev-server/bin/webpack-dev-server --config webpack-configs/webpack.config.web.babel.js --mode development --progress --colors --history-api-fallback --hot --inline", + "build-web": "cross-env NODE_ENV=production webpack -r @babel/register --progress --display-error-details --colors --mode production --config webpack-configs/webpack.config.web.babel.js", "build": "concurrently \"yarn build-main\" \"yarn build-renderer\"", - "build-dll": "cross-env NODE_ENV=development webpack --config ./configs/webpack.config.renderer.dev.dll.babel.js --colors", + "build-dll": "cross-env NODE_ENV=development webpack --config ./webpack-configs/webpack.config.renderer.dev.dll.babel.js --colors", "build-e2e": "cross-env E2E_BUILD=true yarn build", - "build-main": "cross-env NODE_ENV=production webpack --config ./configs/webpack.config.main.prod.babel.js --colors", - "build-renderer": "cross-env NODE_ENV=production webpack --config ./configs/webpack.config.renderer.prod.babel.js --colors", + "build-main": "cross-env NODE_ENV=production webpack --config ./webpack-configs/webpack.config.main.prod.babel.js --colors", + "build-renderer": "cross-env NODE_ENV=production webpack --config ./webpack-configs/webpack.config.renderer.prod.babel.js --colors", "dev": "cross-env START_HOT=1 node -r @babel/register ./internals/scripts/CheckPortInUse.js && cross-env START_HOT=1 yarn start-renderer-dev", - "flow": "flow", - "flow-typed": "rimraf flow-typed/npm && flow-typed install --overwrite || true", "lint": "cross-env NODE_ENV=development eslint --cache --format=pretty 'app/**/*.jsx' 'app/**/*.js' '__tests__/**/*.js'", "lint-fix": "yarn lint --fix; exit 0", "lint-styles": "stylelint --ignore-path .eslintignore '**/*.*(css|scss)' --syntax scss", @@ -27,15 +25,12 @@ "package-mac": "yarn build && electron-builder build -m --publish never", "package-mac-with-download-build": "yarn download-mac-build && yarn package-mac", "postinstall": "electron-builder install-app-deps package.json && yarn build-dll && opencollective-postinstall", - "preinstall": "node ./internals/scripts/CheckYarn.js", "prestart": "yarn build", "start": "cross-env electron -r @babel/register ./app/main.dev.js", "start-main-dev": "cross-env HOT=1 NODE_ENV=development electron -r @babel/register ./app/main.dev.js", - "start-renderer-dev": "cross-env NODE_ENV=development webpack-dev-server --config configs/webpack.config.renderer.dev.babel.js", + "start-renderer-dev": "cross-env NODE_ENV=development webpack-dev-server --config webpack-configs/webpack.config.renderer.dev.babel.js", "test": "cross-env NODE_ENV=test BABEL_DISABLE_CACHE=1 jest", - "test-all": "yarn lint && yarn build && yarn test && yarn build-e2e && yarn test-e2e", - "test-e2e": "node -r @babel/register ./internals/scripts/CheckBuiltsExist.js && cross-env NODE_ENV=test testcafe electron:./ ./test/e2e/HomePage.e2e.js", - "test-e2e-live": "node -r @babel/register ./internals/scripts/CheckBuiltsExist.js && cross-env NODE_ENV=test testcafe-live electron:./ ./test/e2e/HomePage.e2e.js", + "test-all": "yarn lint && yarn build && yarn test", "test-watch": "yarn test --watch", "download-linux-build": "DOWNLOAD_ECHO_NODE_OS=linux node -r @babel/register ./internals/scripts/DownloadBuild.js", "download-mac-build": "DOWNLOAD_ECHO_NODE_OS=mac node -r @babel/register ./internals/scripts/DownloadBuild.js" @@ -45,17 +40,8 @@ "cross-env NODE_ENV=development eslint --cache --format=pretty", "git add" ], - "{*.json,.{babelrc,eslintrc,prettierrc,stylelintrc}}": [ - "prettier --ignore-path .eslintignore --parser json --write", - "git add" - ], "*.{css,scss}": [ "stylelint --ignore-path .eslintignore --syntax scss --fix", - "prettier --ignore-path .eslintignore --single-quote --write", - "git add" - ], - "*.{html,md,yml}": [ - "prettier --ignore-path .eslintignore --single-quote --write", "git add" ] }, @@ -177,7 +163,6 @@ "@babel/plugin-transform-react-constant-elements": "^7.2.0", "@babel/plugin-transform-react-inline-elements": "^7.2.0", "@babel/preset-env": "^7.2.3", - "@babel/preset-flow": "^7.0.0", "@babel/preset-react": "^7.0.0", "@babel/register": "^7.0.0", "babel-core": "7.0.0-bridge.0", @@ -189,6 +174,7 @@ "chalk": "^2.4.1", "clean-webpack-plugin": "^2.0.1", "concurrently": "^4.1.0", + "config": "^3.2.4", "core-js": "^3.0.0", "cross-env": "^5.2.0", "cross-spawn": "^6.0.5", @@ -204,23 +190,15 @@ "eslint": "^5.11.0", "eslint-config-airbnb": "^17.1.0", "eslint-config-erb": "^0.0.2", - "eslint-config-prettier": "^3.3.0", "eslint-formatter-pretty": "^2.0.0", "eslint-import-resolver-webpack": "^0.10.1", "eslint-plugin-compat": "^2.6.3", - "eslint-plugin-flowtype": "^3.2.0", "eslint-plugin-import": "^2.14.0", "eslint-plugin-jest": "^22.1.2", "eslint-plugin-jsx-a11y": "6.1.2", - "eslint-plugin-prettier": "^3.0.0", "eslint-plugin-promise": "^4.0.1", "eslint-plugin-react": "^7.11.1", - "eslint-plugin-testcafe": "^0.2.1", - "fbjs-scripts": "^1.0.1", "file-loader": "^3.0.1", - "flow-bin": "^0.77.0", - "flow-runtime": "^0.17.0", - "flow-typed": "^2.5.1", "html-webpack-plugin": "^3.2.0", "husky": "^1.3.0", "identity-obj-proxy": "^3.0.0", @@ -230,7 +208,6 @@ "node-sass": "^4.11.0", "opencollective-postinstall": "^2.0.1", "optimize-css-assets-webpack-plugin": "^5.0.1", - "prettier": "^1.15.3", "react-test-renderer": "^16.7.0", "redux-logger": "^3.0.6", "rimraf": "^2.6.3", @@ -239,22 +216,17 @@ "spectron": "^5.0.0", "style-loader": "^0.23.1", "stylelint": "^9.9.0", - "stylelint-config-prettier": "^4.0.0", "stylelint-config-standard": "^18.2.0", "stylelint-order": "^2.1.0", + "tar": "^4.4.10", "terser-webpack-plugin": "^1.2.0", - "testcafe": "^0.23.3", - "testcafe-browser-provider-electron": "^0.0.8", - "testcafe-live": "^0.1.4", - "testcafe-react-selectors": "^3.0.2", "url-loader": "^1.1.2", "webpack": "^4.28.2", "webpack-bundle-analyzer": "^3.0.3", "webpack-cli": "^3.1.2", "webpack-dev-server": "^3.1.14", "webpack-merge": "^4.1.5", - "yarn": "^1.12.3", - "tar": "^4.4.10" + "yarn": "^1.12.3" }, "dependencies": { "@fortawesome/fontawesome-free": "^5.6.3", diff --git a/renovate.json b/renovate.json deleted file mode 100644 index 0078e26..0000000 --- a/renovate.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": ["config:base"], - "rangeStrategy": "bump", - "baseBranches": ["next"], - "automerge": true, - "major": { - "automerge": false - } -} diff --git a/resources/linux/test.so b/resources/linux/test.so deleted file mode 100644 index e69de29..0000000 diff --git a/configs/webpack.config.base.js b/webpack-configs/webpack.config.base.js similarity index 100% rename from configs/webpack.config.base.js rename to webpack-configs/webpack.config.base.js diff --git a/configs/webpack.config.eslint.js b/webpack-configs/webpack.config.eslint.js similarity index 100% rename from configs/webpack.config.eslint.js rename to webpack-configs/webpack.config.eslint.js diff --git a/configs/webpack.config.main.prod.babel.js b/webpack-configs/webpack.config.main.prod.babel.js similarity index 100% rename from configs/webpack.config.main.prod.babel.js rename to webpack-configs/webpack.config.main.prod.babel.js diff --git a/configs/webpack.config.renderer.dev.babel.js b/webpack-configs/webpack.config.renderer.dev.babel.js similarity index 100% rename from configs/webpack.config.renderer.dev.babel.js rename to webpack-configs/webpack.config.renderer.dev.babel.js diff --git a/configs/webpack.config.renderer.dev.dll.babel.js b/webpack-configs/webpack.config.renderer.dev.dll.babel.js similarity index 100% rename from configs/webpack.config.renderer.dev.dll.babel.js rename to webpack-configs/webpack.config.renderer.dev.dll.babel.js diff --git a/configs/webpack.config.renderer.prod.babel.js b/webpack-configs/webpack.config.renderer.prod.babel.js similarity index 100% rename from configs/webpack.config.renderer.prod.babel.js rename to webpack-configs/webpack.config.renderer.prod.babel.js diff --git a/configs/webpack.config.web.babel.js b/webpack-configs/webpack.config.web.babel.js similarity index 100% rename from configs/webpack.config.web.babel.js rename to webpack-configs/webpack.config.web.babel.js