diff --git a/.gitignore b/.gitignore index 02e8b13d4..6e70c80dc 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ release/ .DS_Store dev-app-update.yml lib/state/data/test_account.json +stats.json diff --git a/Makefile b/Makefile index 6ec15b376..7094df3a3 100644 --- a/Makefile +++ b/Makefile @@ -50,6 +50,10 @@ PUBLISH ?= onTag # Main targets + +.PHONY: stats +stats: + @NODE_ENV=$(NODE_ENV) npx webpack --mode production --config ./webpack.config.js --json > stats.json .PHONY: start start: @NODE_ENV=$(NODE_ENV) DEV_SERVER=$(DEV_SERVER) npx electron . --inspect @@ -62,7 +66,7 @@ dev: dev-server: @$(MAKE) build NODE_ENV=$(NODE_ENV) - @NODE_ENV=$(NODE_ENV) npx webpack-dev-server --config ./webpack.config.js --content-base dist --host $(HOST) --port $(PORT) --hot + @NODE_ENV=$(NODE_ENV) npx webpack serve --config ./webpack.config.js --content-base dist --host $(HOST) --port $(PORT) --hot .PHONY: test test: @@ -87,7 +91,7 @@ endif # Build utils .PHONY: build-app build-app: - @NODE_ENV=$(NODE_ENV) npx webpack $(if $(IS_PRODUCTION),-p) --config ./webpack.config.js + @NODE_ENV=$(NODE_ENV) npx webpack $(if $(IS_PRODUCTION),--mode production) --config ./webpack.config.js .PHONY: build-if-not-exists build-if-not-exists: config.json diff --git a/babel.config.js b/babel.config.js index 6c95282cd..c39b1106d 100644 --- a/babel.config.js +++ b/babel.config.js @@ -32,6 +32,7 @@ module.exports = function (api) { }; return { + sourceType: 'unambiguous', presets, plugins, env, diff --git a/lib/auth/index.tsx b/lib/auth/index.tsx index d0a6815f1..70aa50a4e 100644 --- a/lib/auth/index.tsx +++ b/lib/auth/index.tsx @@ -5,7 +5,7 @@ import { get } from 'lodash'; import getConfig from '../../get-config'; import MailIcon from '../icons/mail'; import SimplenoteLogo from '../icons/simplenote'; -import Spinner from '../components/spinner'; +import Spinner from '@wordpress/components'; import { isElectron, isMac } from '../utils/platform'; import { viewExternalUrl } from '../utils/url-utils'; @@ -216,11 +216,7 @@ export class Auth extends Component { onClick={this.onSubmit} type="submit" > - {this.props.authPending ? ( - - ) : ( - buttonLabel - )} + {this.props.authPending ? : buttonLabel} {!isCreatingAccount && ( diff --git a/lib/boot.ts b/lib/boot.ts index 16ebf4510..b6e31a5b1 100644 --- a/lib/boot.ts +++ b/lib/boot.ts @@ -1,4 +1,5 @@ import './utils/ensure-platform-support'; +import 'setimmediate'; import { parse } from 'cookie'; diff --git a/lib/components/progress-bar/index.tsx b/lib/components/progress-bar/index.tsx index 1a4fc978c..246d159a1 100644 --- a/lib/components/progress-bar/index.tsx +++ b/lib/components/progress-bar/index.tsx @@ -1,15 +1,24 @@ import React from 'react'; -import { LinearProgress } from '@material-ui/core'; -const ProgressBar: typeof LinearProgress = (props) => { +type OwnProps = { + value: number; +}; + +const ProgressBar = (props: OwnProps) => { + const { value } = props; + const completedStyle = { + width: `${value}%`, + }; return ( - +
+
+
); }; diff --git a/lib/components/progress-bar/style.scss b/lib/components/progress-bar/style.scss index 6525bc659..d79eac02f 100644 --- a/lib/components/progress-bar/style.scss +++ b/lib/components/progress-bar/style.scss @@ -1,4 +1,5 @@ -.progress-bar { +.progress-bar .completed { + height: 4px; @at-root .theme-light & { background-color: $studio-gray-5; } @@ -7,6 +8,11 @@ } } +.progress-bar { + width: 100%; + height: 4px; +} + .progress-bar__bar { background-color: $studio-gray-50 !important; } diff --git a/lib/connection-status/index.tsx b/lib/connection-status/index.tsx index f3318fe2c..ebedb6f10 100644 --- a/lib/connection-status/index.tsx +++ b/lib/connection-status/index.tsx @@ -1,6 +1,6 @@ import React, { FunctionComponent } from 'react'; import { connect } from 'react-redux'; -import { Tooltip } from '@material-ui/core'; +import { Tooltip } from '@wordpress/components'; import ConnectionIcon from '../icons/connection'; import NoConnectionIcon from '../icons/no-connection'; @@ -20,9 +20,7 @@ export const ConnectionStatus: FunctionComponent = ({ }) => (
( - +