commit
062939859f
|
@ -26,7 +26,7 @@ const TransactionSucceeded = ({ txHash, blockExplorer }: TransactionSucceededPro
|
||||||
</p>
|
</p>
|
||||||
{verifyBtn}
|
{verifyBtn}
|
||||||
<Link to={`/tx-status?txHash=${txHash}`} className="btn btn-xs">
|
<Link to={`/tx-status?txHash=${txHash}`} className="btn btn-xs">
|
||||||
{translate('NAV_CheckTxStatus')}
|
{translate('NAV_CHECKTXSTATUS')}
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
@ -83,7 +83,7 @@ const PRODUCT_INFO: Link[] = [
|
||||||
const AFFILIATES: Link[] = [
|
const AFFILIATES: Link[] = [
|
||||||
{
|
{
|
||||||
link: ledgerReferralURL,
|
link: ledgerReferralURL,
|
||||||
text: translateRaw('LEDGER_REFERAL_1')
|
text: translateRaw('LEDGER_REFERRAL_1')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
link: trezorReferralURL,
|
link: trezorReferralURL,
|
||||||
|
|
|
@ -78,7 +78,7 @@ const TransactionDataTable: React.SFC<Props> = ({ data, receipt, network }) => {
|
||||||
{statusSeeMore &&
|
{statusSeeMore &&
|
||||||
explorer.tx &&
|
explorer.tx &&
|
||||||
!network.isCustom && (
|
!network.isCustom && (
|
||||||
<NewTabLink className="TxData-row-data-more" href={explorer.tx as string}>
|
<NewTabLink className="TxData-row-data-more" href={explorer.tx}>
|
||||||
(See more on {network.blockExplorer.name})
|
(See more on {network.blockExplorer.name})
|
||||||
</NewTabLink>
|
</NewTabLink>
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -91,7 +91,7 @@ class LedgerNanoSDecryptClass extends PureComponent<Props, State> {
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<NewTabLink className="LedgerDecrypt-buy btn btn-sm btn-default" href={ledgerReferralURL}>
|
<NewTabLink className="LedgerDecrypt-buy btn btn-sm btn-default" href={ledgerReferralURL}>
|
||||||
{translate('LEDGER_REFERAL_2')}
|
{translate('LEDGER_REFERRAL_2')}
|
||||||
</NewTabLink>
|
</NewTabLink>
|
||||||
|
|
||||||
<div className={`LedgerDecrypt-error alert alert-danger ${showErr}`}>{error || '-'}</div>
|
<div className={`LedgerDecrypt-error alert alert-danger ${showErr}`}>{error || '-'}</div>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
&-item {
|
&-item {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding-right: 10px;
|
padding-right: 10px;
|
||||||
border-left: 2px solid;
|
border-left: 2px solid #fff;
|
||||||
|
|
||||||
&-remove {
|
&-remove {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
|
@ -8,7 +8,7 @@ interface Props {
|
||||||
}
|
}
|
||||||
|
|
||||||
const HelpLink: React.SFC<AAttributes & Props> = ({ article, children, ...rest }) => (
|
const HelpLink: React.SFC<AAttributes & Props> = ({ article, children, ...rest }) => (
|
||||||
<NewTabLink {...rest} href={`${knowledgeBaseURL}/${article}`} onClick={this.handleClick}>
|
<NewTabLink {...rest} href={`${knowledgeBaseURL}/${article}`}>
|
||||||
{children}
|
{children}
|
||||||
</NewTabLink>
|
</NewTabLink>
|
||||||
);
|
);
|
||||||
|
|
|
@ -62,6 +62,9 @@
|
||||||
box-shadow: inset 0 1px 0 0 rgba(63, 63, 68, 0.05);
|
box-shadow: inset 0 1px 0 0 rgba(63, 63, 68, 0.05);
|
||||||
transition: border-color 120ms, box-shadow 120ms;
|
transition: border-color 120ms, box-shadow 120ms;
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
|
&[placeholder] {
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
&.border-rad-right-0 {
|
&.border-rad-right-0 {
|
||||||
border-top-right-radius: 0;
|
border-top-right-radius: 0;
|
||||||
|
@ -99,3 +102,7 @@
|
||||||
left: 24px;
|
left: 24px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
textarea.input-group-input {
|
||||||
|
height: initial;
|
||||||
|
}
|
||||||
|
|
|
@ -61,7 +61,7 @@ export default class DropdownComponent<T> extends PureComponent<Props<T>, State>
|
||||||
});
|
});
|
||||||
const searchableStyle = {
|
const searchableStyle = {
|
||||||
maxHeight: '300px',
|
maxHeight: '300px',
|
||||||
overflowY: 'auto'
|
overflowY: 'auto' as 'auto'
|
||||||
};
|
};
|
||||||
const searchRegex = new RegExp(search, 'gi');
|
const searchRegex = new RegExp(search, 'gi');
|
||||||
const onSearchChange = (e: React.FormEvent<HTMLInputElement>) => {
|
const onSearchChange = (e: React.FormEvent<HTMLInputElement>) => {
|
||||||
|
@ -69,7 +69,7 @@ export default class DropdownComponent<T> extends PureComponent<Props<T>, State>
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ul className={menuClass} style={searchable ? searchableStyle : {}}>
|
<ul className={menuClass} style={searchable ? searchableStyle : undefined}>
|
||||||
{searchable && (
|
{searchable && (
|
||||||
<input
|
<input
|
||||||
className="form-control"
|
className="form-control"
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -55,8 +55,8 @@ export default class GenerateMnemonic extends React.Component<{}, State> {
|
||||||
|
|
||||||
<p className="GenerateMnemonic-help">
|
<p className="GenerateMnemonic-help">
|
||||||
{isConfirming
|
{isConfirming
|
||||||
? translate('MNEMONIC_DESCRIPTOION_1')
|
? translate('MNEMONIC_DESCRIPTION_1')
|
||||||
: translate('MNEMONIC_DESCRIPTOION_2')}
|
: translate('MNEMONIC_DESCRIPTION_2')}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div className="GenerateMnemonic-words">
|
<div className="GenerateMnemonic-words">
|
||||||
|
|
|
@ -338,7 +338,7 @@ export default class CurrencySwap extends PureComponent<Props, State> {
|
||||||
|
|
||||||
<div className="input-group-wrapper">
|
<div className="input-group-wrapper">
|
||||||
<div className="input-group input-group-inline">
|
<div className="input-group input-group-inline">
|
||||||
<div className="input-group-header">{translate('SWAP_RECIEVE_INPUT_LABEL')}</div>
|
<div className="input-group-header">{translate('SWAP_RECEIVE_INPUT_LABEL')}</div>
|
||||||
<Input
|
<Input
|
||||||
id="destination-swap-input"
|
id="destination-swap-input"
|
||||||
className={`${
|
className={`${
|
||||||
|
|
|
@ -4,12 +4,7 @@ import {
|
||||||
CustomNetworkAction,
|
CustomNetworkAction,
|
||||||
TypeKeys
|
TypeKeys
|
||||||
} from 'actions/config';
|
} from 'actions/config';
|
||||||
import { CustomNetworkConfig } from 'types/network';
|
import { CustomNetworksState as State } from './types';
|
||||||
|
|
||||||
// TODO: this doesn't accurately represent state, as
|
|
||||||
export interface State {
|
|
||||||
[customNetworkId: string]: CustomNetworkConfig;
|
|
||||||
}
|
|
||||||
|
|
||||||
const addCustomNetwork = (state: State, { payload }: AddCustomNetworkAction): State => ({
|
const addCustomNetwork = (state: State, { payload }: AddCustomNetworkAction): State => ({
|
||||||
...state,
|
...state,
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import { customNetworks, State as CustomNetworksState } from './customNetworks';
|
|
||||||
import { staticNetworks, State as StaticNetworksState } from './staticNetworks';
|
|
||||||
import { combineReducers } from 'redux';
|
import { combineReducers } from 'redux';
|
||||||
|
import { customNetworks } from './customNetworks';
|
||||||
|
import { staticNetworks } from './staticNetworks';
|
||||||
|
import { StaticNetworksState, CustomNetworksState } from './types';
|
||||||
|
|
||||||
interface State {
|
interface State {
|
||||||
customNetworks: CustomNetworksState;
|
customNetworks: CustomNetworksState;
|
||||||
|
|
|
@ -16,9 +16,8 @@ import {
|
||||||
UBQ_DEFAULT
|
UBQ_DEFAULT
|
||||||
} from 'config/dpaths';
|
} from 'config/dpaths';
|
||||||
import { ConfigAction } from 'actions/config';
|
import { ConfigAction } from 'actions/config';
|
||||||
import { StaticNetworkIds, StaticNetworkConfig, BlockExplorerConfig } from 'types/network';
|
import { BlockExplorerConfig } from 'types/network';
|
||||||
|
import { StaticNetworksState as State } from './types';
|
||||||
export type State = { [key in StaticNetworkIds]: StaticNetworkConfig };
|
|
||||||
|
|
||||||
// Must be a website that follows the ethplorer convention of /tx/[hash] and
|
// Must be a website that follows the ethplorer convention of /tx/[hash] and
|
||||||
// address/[address] to generate the correct functions.
|
// address/[address] to generate the correct functions.
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
// Moving state types into their own file resolves an annoying webpack bug
|
||||||
|
// https://github.com/angular/angular-cli/issues/2034
|
||||||
|
import { StaticNetworkIds, StaticNetworkConfig, CustomNetworkConfig } from 'types/network';
|
||||||
|
|
||||||
|
export type StaticNetworksState = { [key in StaticNetworkIds]: StaticNetworkConfig };
|
||||||
|
|
||||||
|
// TODO: this doesn't accurately represent custom networks state
|
||||||
|
export interface CustomNetworksState {
|
||||||
|
[customNetworkId: string]: CustomNetworkConfig;
|
||||||
|
}
|
|
@ -4,11 +4,7 @@ import {
|
||||||
AddCustomNodeAction,
|
AddCustomNodeAction,
|
||||||
RemoveCustomNodeAction
|
RemoveCustomNodeAction
|
||||||
} from 'actions/config';
|
} from 'actions/config';
|
||||||
import { CustomNodeConfig } from 'types/node';
|
import { CustomNodesState as State } from './types';
|
||||||
|
|
||||||
export interface State {
|
|
||||||
[customNodeId: string]: CustomNodeConfig;
|
|
||||||
}
|
|
||||||
|
|
||||||
const addCustomNode = (state: State, { payload }: AddCustomNodeAction): State => ({
|
const addCustomNode = (state: State, { payload }: AddCustomNodeAction): State => ({
|
||||||
...state,
|
...state,
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
import { customNodes, State as CustomNodesState } from './customNodes';
|
|
||||||
import { staticNodes, State as StaticNodesState } from './staticNodes';
|
|
||||||
import { selectedNode, State as SelectedNodeState } from './selectedNode';
|
|
||||||
import { combineReducers } from 'redux';
|
import { combineReducers } from 'redux';
|
||||||
|
import { customNodes } from './customNodes';
|
||||||
|
import { staticNodes } from './staticNodes';
|
||||||
|
import { selectedNode } from './selectedNode';
|
||||||
|
import { CustomNodesState, StaticNodesState, SelectedNodeState } from './types';
|
||||||
|
|
||||||
interface State {
|
interface State {
|
||||||
customNodes: CustomNodesState;
|
customNodes: CustomNodesState;
|
||||||
|
|
|
@ -6,20 +6,9 @@ import {
|
||||||
RemoveCustomNodeAction,
|
RemoveCustomNodeAction,
|
||||||
CustomNodeAction
|
CustomNodeAction
|
||||||
} from 'actions/config';
|
} from 'actions/config';
|
||||||
|
import { SelectedNodeState as State } from './types';
|
||||||
|
|
||||||
interface NodeLoaded {
|
export const INITIAL_STATE: State = {
|
||||||
pending: false;
|
|
||||||
nodeId: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface NodeChangePending {
|
|
||||||
pending: true;
|
|
||||||
nodeId: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export type State = NodeLoaded | NodeChangePending;
|
|
||||||
|
|
||||||
export const INITIAL_STATE: NodeLoaded = {
|
|
||||||
nodeId: 'eth_mycrypto',
|
nodeId: 'eth_mycrypto',
|
||||||
pending: false
|
pending: false
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
import { EtherscanNode, InfuraNode, RPCNode } from 'libs/nodes';
|
import { EtherscanNode, InfuraNode, RPCNode } from 'libs/nodes';
|
||||||
import { TypeKeys, NodeAction } from 'actions/config';
|
import { TypeKeys, NodeAction } from 'actions/config';
|
||||||
import { NonWeb3NodeConfigs, Web3NodeConfigs } from 'types/node';
|
import { StaticNodesState as State } from './types';
|
||||||
|
|
||||||
export type State = NonWeb3NodeConfigs & Web3NodeConfigs;
|
|
||||||
|
|
||||||
export const INITIAL_STATE: State = {
|
export const INITIAL_STATE: State = {
|
||||||
eth_mycrypto: {
|
eth_mycrypto: {
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
// Moving state types into their own file resolves an annoying webpack bug
|
||||||
|
// https://github.com/angular/angular-cli/issues/2034
|
||||||
|
import { NonWeb3NodeConfigs, Web3NodeConfigs, CustomNodeConfig } from 'types/node';
|
||||||
|
|
||||||
|
export interface CustomNodesState {
|
||||||
|
[customNodeId: string]: CustomNodeConfig;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface NodeLoaded {
|
||||||
|
pending: false;
|
||||||
|
nodeId: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface NodeChangePending {
|
||||||
|
pending: true;
|
||||||
|
nodeId: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SelectedNodeState = NodeLoaded | NodeChangePending;
|
||||||
|
|
||||||
|
export type StaticNodesState = NonWeb3NodeConfigs & Web3NodeConfigs;
|
|
@ -79,7 +79,7 @@ export function* shouldBroadcastTransaction(indexingHash: string): SagaIterator
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
export function* getSerializedTxAndIndexingHash({ type }: BroadcastRequestedAction) {
|
export function* getSerializedTxAndIndexingHash({ type }: BroadcastRequestedAction): SagaIterator {
|
||||||
const isWeb3Req = type === TK.BROADCAST_WEB3_TRANSACTION_REQUESTED;
|
const isWeb3Req = type === TK.BROADCAST_WEB3_TRANSACTION_REQUESTED;
|
||||||
const txSelector = isWeb3Req ? getWeb3Tx : getSignedTx;
|
const txSelector = isWeb3Req ? getWeb3Tx : getSignedTx;
|
||||||
const serializedTransaction: StateSerializedTx = yield select(txSelector);
|
const serializedTransaction: StateSerializedTx = yield select(txSelector);
|
||||||
|
|
|
@ -39,7 +39,9 @@ const signTransactionWrapper = (func: (IWalletAndTx: IFullWalletAndTransaction)
|
||||||
* the rest of the tx parameters from the action
|
* the rest of the tx parameters from the action
|
||||||
* @param partialTx
|
* @param partialTx
|
||||||
*/
|
*/
|
||||||
function* getWalletAndTransaction(partialTx: SignTransactionRequestedAction['payload']) {
|
function* getWalletAndTransaction(
|
||||||
|
partialTx: SignTransactionRequestedAction['payload']
|
||||||
|
): SagaIterator {
|
||||||
// get the wallet we're going to sign with
|
// get the wallet we're going to sign with
|
||||||
const wallet: null | IFullWallet = yield select(getWalletInst);
|
const wallet: null | IFullWallet = yield select(getWalletInst);
|
||||||
if (!wallet) {
|
if (!wallet) {
|
||||||
|
|
|
@ -349,8 +349,8 @@
|
||||||
"ETHERSCAMDB": "EtherScamDB",
|
"ETHERSCAMDB": "EtherScamDB",
|
||||||
"ETHER_SECURITY_LOOKUP": "Ether Security Lookup",
|
"ETHER_SECURITY_LOOKUP": "Ether Security Lookup",
|
||||||
"ETHER_ADDRESS_LOOKUP": "Ether Address Lookup",
|
"ETHER_ADDRESS_LOOKUP": "Ether Address Lookup",
|
||||||
"LEDGER_REFERAL_1": "Buy a Ledger Wallet",
|
"LEDGER_REFERRAL_1": "Buy a Ledger Wallet",
|
||||||
"LEDGER_REFERAL_2": "Don’t have a Ledger? Order one now!",
|
"LEDGER_REFERRAL_2": "Don’t have a Ledger? Order one now!",
|
||||||
"TREZOR_REFERAL": "Buy a TREZOR",
|
"TREZOR_REFERAL": "Buy a TREZOR",
|
||||||
"ETHERCARD_REFERAL": "Get an ether.card",
|
"ETHERCARD_REFERAL": "Get an ether.card",
|
||||||
"DISCLAIMER": "Disclaimer",
|
"DISCLAIMER": "Disclaimer",
|
||||||
|
@ -368,8 +368,8 @@
|
||||||
"REGENERATE_MNEMONIC": "Regenerate Phrase",
|
"REGENERATE_MNEMONIC": "Regenerate Phrase",
|
||||||
"CONFIRM_MNEMONIC": "Confirm Phrase",
|
"CONFIRM_MNEMONIC": "Confirm Phrase",
|
||||||
"MNEMONIC_CHOOSE_ADDR": "Choose address",
|
"MNEMONIC_CHOOSE_ADDR": "Choose address",
|
||||||
"MNEMONIC_DESCRIPTOION_1": "Re-enter your phrase to confirm you copied it correctly. If you forgot one of your words, just click the button beside the input to reveal it.",
|
"MNEMONIC_DESCRIPTION_1": "Re-enter your phrase to confirm you copied it correctly. If you forgot one of your words, just click the button beside the input to reveal it.",
|
||||||
"MNEMONIC_DESCRIPTOION_2": "Write these words down. Do not copy them to your clipboard, or save them anywhere online.",
|
"MNEMONIC_DESCRIPTION_2": "Write these words down. Do not copy them to your clipboard, or save them anywhere online.",
|
||||||
"MODAL_BACK": "Back",
|
"MODAL_BACK": "Back",
|
||||||
"WALLET_UNLOCKING": "Unlocking...",
|
"WALLET_UNLOCKING": "Unlocking...",
|
||||||
"HELP_ARTICLE_1": "How to use MyCrypto with your Nano S",
|
"HELP_ARTICLE_1": "How to use MyCrypto with your Nano S",
|
||||||
|
@ -442,9 +442,9 @@
|
||||||
"TX_STATUS": "Status",
|
"TX_STATUS": "Status",
|
||||||
"TX_BLOCK_NUMB": "Block Number",
|
"TX_BLOCK_NUMB": "Block Number",
|
||||||
"TX_GAS_USED": "Gas Used",
|
"TX_GAS_USED": "Gas Used",
|
||||||
"VERIFY_TX": "Verify transaction on $block_explorere",
|
"VERIFY_TX": "Verify transaction on $block_explorer",
|
||||||
"SWAP_DEPOSIT_INPUT_LABEL": "Deposit",
|
"SWAP_DEPOSIT_INPUT_LABEL": "Deposit",
|
||||||
"SWAP_RECIEVE_INPUT_LABEL": "Recieve",
|
"SWAP_RECEIVE_INPUT_LABEL": "Receive",
|
||||||
"SWAP_MAX_ERROR": "Maximum $rate_max $origin_id",
|
"SWAP_MAX_ERROR": "Maximum $rate_max $origin_id",
|
||||||
"SWAP_MIN_ERROR": "Minimum $rate_max $origin_id",
|
"SWAP_MIN_ERROR": "Minimum $rate_max $origin_id",
|
||||||
"ADD_CUSTOM_TKN_HELP": "Need help? Learn how to add custom tokens.",
|
"ADD_CUSTOM_TKN_HELP": "Need help? Learn how to add custom tokens.",
|
||||||
|
|
74
package.json
74
package.json
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "MyCrypto",
|
"name": "MyCrypto",
|
||||||
"author": "MyCryptoHQ",
|
"author": "MyCryptoHQ",
|
||||||
"version": "0.6.1",
|
"version": "0.6.3",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"description": "MyCrypto web and electron app",
|
"description": "MyCrypto web and electron app",
|
||||||
"repository": "https://github.com/MyCryptoHQ/MyCrypto",
|
"repository": "https://github.com/MyCryptoHQ/MyCrypto",
|
||||||
|
@ -15,14 +15,13 @@
|
||||||
"bn.js": "4.11.8",
|
"bn.js": "4.11.8",
|
||||||
"bootstrap-sass": "3.3.7",
|
"bootstrap-sass": "3.3.7",
|
||||||
"classnames": "2.2.5",
|
"classnames": "2.2.5",
|
||||||
"electron-updater": "2.21.3",
|
"electron-updater": "2.21.4",
|
||||||
"ethereum-blockies-base64": "1.0.1",
|
"ethereum-blockies-base64": "1.0.1",
|
||||||
"ethereumjs-abi": "0.6.5",
|
"ethereumjs-abi": "0.6.5",
|
||||||
"ethereumjs-tx": "1.3.4",
|
"ethereumjs-tx": "1.3.4",
|
||||||
"ethereumjs-util": "5.1.5",
|
"ethereumjs-util": "5.1.5",
|
||||||
"ethereumjs-wallet": "0.6.0",
|
"ethereumjs-wallet": "0.6.0",
|
||||||
"font-awesome": "4.7.0",
|
"font-awesome": "4.7.0",
|
||||||
"hard-source-webpack-plugin": "0.5.16",
|
|
||||||
"hdkey": "0.8.0",
|
"hdkey": "0.8.0",
|
||||||
"idna-uts46": "1.1.0",
|
"idna-uts46": "1.1.0",
|
||||||
"jsonschema": "1.2.2",
|
"jsonschema": "1.2.2",
|
||||||
|
@ -49,7 +48,7 @@
|
||||||
"redux-saga": "0.16.0",
|
"redux-saga": "0.16.0",
|
||||||
"scryptsy": "2.0.0",
|
"scryptsy": "2.0.0",
|
||||||
"uuid": "3.2.1",
|
"uuid": "3.2.1",
|
||||||
"wallet-address-validator": "0.1.3",
|
"wallet-address-validator": "0.1.4",
|
||||||
"whatwg-fetch": "2.0.3",
|
"whatwg-fetch": "2.0.3",
|
||||||
"zxcvbn": "4.4.2"
|
"zxcvbn": "4.4.2"
|
||||||
},
|
},
|
||||||
|
@ -65,22 +64,18 @@
|
||||||
"@types/qrcode.react": "0.6.3",
|
"@types/qrcode.react": "0.6.3",
|
||||||
"@types/query-string": "5.1.0",
|
"@types/query-string": "5.1.0",
|
||||||
"@types/rc-slider": "8.2.3",
|
"@types/rc-slider": "8.2.3",
|
||||||
"@types/react": "16.0.40",
|
"@types/react": "16.0.41",
|
||||||
"@types/react-dom": "16.0.4",
|
"@types/react-dom": "16.0.4",
|
||||||
"@types/react-redux": "5.0.15",
|
"@types/react-redux": "5.0.15",
|
||||||
"@types/react-router-dom": "4.2.5",
|
"@types/react-router-dom": "4.2.5",
|
||||||
"@types/react-router-redux": "5.0.12",
|
"@types/react-router-redux": "5.0.12",
|
||||||
"@types/react-select": "1.2.5",
|
"@types/react-select": "1.2.6",
|
||||||
"@types/react-transition-group": "2.0.7",
|
"@types/react-transition-group": "2.0.7",
|
||||||
"@types/redux-logger": "3.0.5",
|
"@types/redux-logger": "3.0.5",
|
||||||
"@types/uuid": "3.4.3",
|
"@types/uuid": "3.4.3",
|
||||||
"@types/webpack-env": "1.13.4",
|
"@types/webpack-env": "1.13.4",
|
||||||
"@types/zxcvbn": "4.4.0",
|
"@types/zxcvbn": "4.4.0",
|
||||||
"autodll-webpack-plugin": "0.3.8",
|
"autodll-webpack-plugin": "0.3.9",
|
||||||
"awesome-typescript-loader": "3.5.0",
|
|
||||||
"babel-minify-webpack-plugin": "0.3.0",
|
|
||||||
"bs58": "4.0.1",
|
|
||||||
"cache-loader": "1.2.2",
|
|
||||||
"check-node-version": "3.2.0",
|
"check-node-version": "3.2.0",
|
||||||
"concurrently": "3.5.1",
|
"concurrently": "3.5.1",
|
||||||
"copy-webpack-plugin": "4.5.1",
|
"copy-webpack-plugin": "4.5.1",
|
||||||
|
@ -92,47 +87,44 @@
|
||||||
"enzyme-adapter-react-16": "1.1.1",
|
"enzyme-adapter-react-16": "1.1.1",
|
||||||
"enzyme-to-json": "3.3.3",
|
"enzyme-to-json": "3.3.3",
|
||||||
"express": "4.16.2",
|
"express": "4.16.2",
|
||||||
"extract-text-webpack-plugin": "3.0.2",
|
"favicons-webpack-plugin": "0.0.8",
|
||||||
"favicons-webpack-plugin": "0.0.7",
|
|
||||||
"file-loader": "1.1.11",
|
"file-loader": "1.1.11",
|
||||||
"friendly-errors-webpack-plugin": "1.6.1",
|
"friendly-errors-webpack-plugin": "1.6.1",
|
||||||
"glob": "7.1.2",
|
"hard-source-webpack-plugin": "0.6.4",
|
||||||
"hoist-non-react-statics": "2.5.0",
|
"html-webpack-plugin": "3.0.6",
|
||||||
"html-webpack-plugin": "3.0.3",
|
|
||||||
"husky": "0.14.3",
|
"husky": "0.14.3",
|
||||||
"image-webpack-loader": "4.2.0",
|
"image-webpack-loader": "4.2.0",
|
||||||
"jest": "22.1.4",
|
"jest": "22.1.4",
|
||||||
"klaw-sync": "3.0.2",
|
"klaw-sync": "3.0.2",
|
||||||
"lint-staged": "7.0.0",
|
"lint-staged": "7.0.0",
|
||||||
|
"mini-css-extract-plugin": "0.2.0",
|
||||||
"minimist": "1.2.0",
|
"minimist": "1.2.0",
|
||||||
"node-sass": "4.8.3",
|
"node-sass": "4.8.3",
|
||||||
"nodemon": "1.17.2",
|
"nodemon": "1.17.2",
|
||||||
"null-loader": "0.1.1",
|
"null-loader": "0.1.1",
|
||||||
"prettier": "1.11.1",
|
"prettier": "1.11.1",
|
||||||
"progress": "2.0.0",
|
"react-hot-loader": "4.0.0",
|
||||||
"react-hot-loader": "3.1.3",
|
|
||||||
"react-test-renderer": "16.2.0",
|
|
||||||
"redux-devtools-extension": "2.13.2",
|
"redux-devtools-extension": "2.13.2",
|
||||||
"redux-test-utils": "0.2.2",
|
"redux-test-utils": "0.2.2",
|
||||||
"resolve-url-loader": "2.3.0",
|
|
||||||
"rimraf": "2.6.2",
|
"rimraf": "2.6.2",
|
||||||
"sass-loader": "6.0.7",
|
"sass-loader": "6.0.7",
|
||||||
"style-loader": "0.20.3",
|
"style-loader": "0.20.3",
|
||||||
"thread-loader": "1.1.5",
|
"thread-loader": "1.1.5",
|
||||||
"ts-jest": "22.4.2",
|
"ts-jest": "22.4.2",
|
||||||
"ts-loader": "3.3.1",
|
"ts-loader": "4.1.0",
|
||||||
"tslint": "5.9.1",
|
"tslint": "5.9.1",
|
||||||
"tslint-config-prettier": "1.10.0",
|
"tslint-config-prettier": "1.10.0",
|
||||||
"tslint-microsoft-contrib": "5.0.3",
|
"tslint-microsoft-contrib": "5.0.3",
|
||||||
"tslint-react": "3.5.1",
|
"tslint-react": "3.5.1",
|
||||||
"types-rlp": "0.0.1",
|
"types-rlp": "0.0.1",
|
||||||
"typescript": "2.6.2",
|
"typescript": "2.7.2",
|
||||||
"url-loader": "1.0.1",
|
"uglifyjs-webpack-plugin": "1.2.4",
|
||||||
"url-search-params-polyfill": "3.0.0",
|
"url-search-params-polyfill": "3.0.0",
|
||||||
"webpack": "3.11.0",
|
"webpack": "4.2.0",
|
||||||
"webpack-dev-middleware": "2.0.6",
|
"webpack-cli": "2.0.13",
|
||||||
"webpack-hot-middleware": "2.21.0",
|
"webpack-dev-middleware": "3.1.0",
|
||||||
"webpack-sources": "1.0.1",
|
"webpack-hot-middleware": "2.21.2",
|
||||||
|
"webpack-sources": "1.1.0",
|
||||||
"webpack-subresource-integrity": "1.1.0-rc.4",
|
"webpack-subresource-integrity": "1.1.0-rc.4",
|
||||||
"what-input": "5.0.5",
|
"what-input": "5.0.5",
|
||||||
"worker-loader": "1.1.1"
|
"worker-loader": "1.1.1"
|
||||||
|
@ -141,18 +133,14 @@
|
||||||
"freezer": "webpack --config=./webpack_config/webpack.freezer.js && node ./dist/freezer.js",
|
"freezer": "webpack --config=./webpack_config/webpack.freezer.js && node ./dist/freezer.js",
|
||||||
"freezer:validate": "npm run freezer -- --validate",
|
"freezer:validate": "npm run freezer -- --validate",
|
||||||
"db": "nodemon ./db",
|
"db": "nodemon ./db",
|
||||||
"build": "webpack --config webpack_config/webpack.prod.js",
|
"build": "webpack --mode=production --config webpack_config/webpack.prod.js",
|
||||||
"prebuild": "check-node-version --package",
|
"prebuild": "check-node-version --package",
|
||||||
"build:downloadable": "webpack --config webpack_config/webpack.html.js",
|
"build:downloadable": "webpack --mode=production --config webpack_config/webpack.html.js",
|
||||||
"prebuild:downloadable": "check-node-version --package",
|
"prebuild:downloadable": "check-node-version --package",
|
||||||
"build:electron":
|
"build:electron": "webpack --config webpack_config/webpack.electron-prod.js && node webpack_config/buildElectron.js",
|
||||||
"webpack --config webpack_config/webpack.electron-prod.js && node webpack_config/buildElectron.js",
|
"build:electron:osx": "webpack --config webpack_config/webpack.electron-prod.js && ELECTRON_OS=osx node webpack_config/buildElectron.js",
|
||||||
"build:electron:osx":
|
"build:electron:windows": "webpack --config webpack_config/webpack.electron-prod.js && ELECTRON_OS=windows node webpack_config/buildElectron.js",
|
||||||
"webpack --config webpack_config/webpack.electron-prod.js && ELECTRON_OS=osx node webpack_config/buildElectron.js",
|
"build:electron:linux": "webpack --config webpack_config/webpack.electron-prod.js && ELECTRON_OS=linux node webpack_config/buildElectron.js",
|
||||||
"build:electron:windows":
|
|
||||||
"webpack --config webpack_config/webpack.electron-prod.js && ELECTRON_OS=windows node webpack_config/buildElectron.js",
|
|
||||||
"build:electron:linux":
|
|
||||||
"webpack --config webpack_config/webpack.electron-prod.js && ELECTRON_OS=linux node webpack_config/buildElectron.js",
|
|
||||||
"prebuild:electron": "check-node-version --package",
|
"prebuild:electron": "check-node-version --package",
|
||||||
"jenkins:build:linux": "webpack --config webpack_config/webpack.electron-prod.js && ELECTRON_OS=JENKINS_LINUX node webpack_config/buildElectron.js",
|
"jenkins:build:linux": "webpack --config webpack_config/webpack.electron-prod.js && ELECTRON_OS=JENKINS_LINUX node webpack_config/buildElectron.js",
|
||||||
"jenkins:build:mac": "webpack --config webpack_config/webpack.electron-prod.js && ELECTRON_OS=JENKINS_MAC node webpack_config/buildElectron.js",
|
"jenkins:build:mac": "webpack --config webpack_config/webpack.electron-prod.js && ELECTRON_OS=JENKINS_MAC node webpack_config/buildElectron.js",
|
||||||
|
@ -167,18 +155,14 @@
|
||||||
"predev": "check-node-version --package",
|
"predev": "check-node-version --package",
|
||||||
"dev:https": "HTTPS=true node webpack_config/devServer.js",
|
"dev:https": "HTTPS=true node webpack_config/devServer.js",
|
||||||
"predev:https": "check-node-version --package",
|
"predev:https": "check-node-version --package",
|
||||||
"dev:electron":
|
"dev:electron": "concurrently --kill-others --names 'webpack,electron' 'BUILD_ELECTRON=true node webpack_config/devServer.js' 'webpack --config webpack_config/webpack.electron-dev.js && electron dist/electron-js/main.js'",
|
||||||
"concurrently --kill-others --names 'webpack,electron' 'BUILD_ELECTRON=true node webpack_config/devServer.js' 'webpack --config webpack_config/webpack.electron-dev.js && electron dist/electron-js/main.js'",
|
"dev:electron:https": "concurrently --kill-others --names 'webpack,electron' 'BUILD_ELECTRON=true HTTPS=true node webpack_config/devServer.js' 'HTTPS=true webpack --config webpack_config/webpack.electron-dev.js && electron dist/electron-js/main.js'",
|
||||||
"dev:electron:https":
|
|
||||||
"concurrently --kill-others --names 'webpack,electron' 'BUILD_ELECTRON=true HTTPS=true node webpack_config/devServer.js' 'HTTPS=true webpack --config webpack_config/webpack.electron-dev.js && electron dist/electron-js/main.js'",
|
|
||||||
"tslint": "tslint --project . --exclude common/vendor/**/*",
|
"tslint": "tslint --project . --exclude common/vendor/**/*",
|
||||||
"tscheck": "tsc --noEmit",
|
"tscheck": "tsc --noEmit",
|
||||||
"start": "npm run dev",
|
"start": "npm run dev",
|
||||||
"precommit": "lint-staged",
|
"precommit": "lint-staged",
|
||||||
"formatAll":
|
"formatAll": "find ./common/ -name '*.ts*' | xargs prettier --write --config ./.prettierrc --config-precedence file-override",
|
||||||
"find ./common/ -name '*.ts*' | xargs prettier --write --config ./.prettierrc --config-precedence file-override",
|
"prettier:diff": "prettier --write --config ./.prettierrc --list-different \"common/**/*.ts\" \"common/**/*.tsx\"",
|
||||||
"prettier:diff":
|
|
||||||
"prettier --write --config ./.prettierrc --list-different \"common/**/*.ts\" \"common/**/*.tsx\"",
|
|
||||||
"prepush": "npm run tslint && npm run tscheck"
|
"prepush": "npm run tslint && npm run tscheck"
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
|
|
|
@ -1,11 +1,15 @@
|
||||||
import packageJSON from '../package.json';
|
import packageJSON from '../package.json';
|
||||||
|
|
||||||
|
interface Dependencies {
|
||||||
|
[key: string]: string;
|
||||||
|
}
|
||||||
|
|
||||||
// from https://docs.npmjs.com/files/package.json#dependencies
|
// from https://docs.npmjs.com/files/package.json#dependencies
|
||||||
const nonExactPrefixes = ['~', '^', '>', '>=', '<', '<='];
|
const nonExactPrefixes = ['~', '^', '>', '>=', '<', '<='];
|
||||||
|
|
||||||
describe('package.json', () => {
|
describe('package.json', () => {
|
||||||
it('dependencies should not contain any non-exact versions', () => {
|
it('dependencies should not contain any non-exact versions', () => {
|
||||||
const deps = Object.values(packageJSON.dependencies);
|
const deps = Object.values(packageJSON.dependencies as Dependencies);
|
||||||
deps.forEach(depVersion => {
|
deps.forEach(depVersion => {
|
||||||
nonExactPrefixes.forEach(badPrefix => {
|
nonExactPrefixes.forEach(badPrefix => {
|
||||||
expect(depVersion.includes(badPrefix)).toBeFalsy();
|
expect(depVersion.includes(badPrefix)).toBeFalsy();
|
||||||
|
@ -13,7 +17,7 @@ describe('package.json', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
it('devDependencies should not contain any non-exact versions', () => {
|
it('devDependencies should not contain any non-exact versions', () => {
|
||||||
const deps = Object.values(packageJSON.devDependencies);
|
const deps = Object.values(packageJSON.devDependencies as Dependencies);
|
||||||
deps.forEach(depVersion => {
|
deps.forEach(depVersion => {
|
||||||
nonExactPrefixes.forEach(badPrefix => {
|
nonExactPrefixes.forEach(badPrefix => {
|
||||||
expect(depVersion.includes(badPrefix)).toBeFalsy();
|
expect(depVersion.includes(badPrefix)).toBeFalsy();
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import { changeNodeIntent, changeNode } from 'actions/config';
|
import { changeNodeIntent, changeNode } from 'actions/config';
|
||||||
import { State, selectedNode } from 'reducers/config/nodes/selectedNode';
|
import { selectedNode } from 'reducers/config/nodes/selectedNode';
|
||||||
|
import { SelectedNodeState } from 'reducers/config/nodes/types';
|
||||||
|
|
||||||
export const expectedState = {
|
export const expectedState = {
|
||||||
initialState: { nodeId: 'eth_mycrypto', pending: false },
|
initialState: { nodeId: 'eth_mycrypto', pending: false },
|
||||||
|
@ -20,9 +21,9 @@ describe('selected node reducer', () => {
|
||||||
expect(selectedNode(undefined, actions.changeNode)).toEqual(expectedState.nodeChange));
|
expect(selectedNode(undefined, actions.changeNode)).toEqual(expectedState.nodeChange));
|
||||||
|
|
||||||
it('should handle the intent to change a node', () =>
|
it('should handle the intent to change a node', () =>
|
||||||
expect(selectedNode(expectedState.initialState as State, actions.changeNodeIntent)).toEqual(
|
expect(
|
||||||
expectedState.nodeChangeIntent
|
selectedNode(expectedState.initialState as SelectedNodeState, actions.changeNodeIntent)
|
||||||
));
|
).toEqual(expectedState.nodeChangeIntent));
|
||||||
});
|
});
|
||||||
|
|
||||||
export { actions as selectedNodeActions, expectedState as selectedNodeExpectedState };
|
export { actions as selectedNodeActions, expectedState as selectedNodeExpectedState };
|
||||||
|
|
|
@ -45,7 +45,7 @@ const devMiddleWare = require('webpack-dev-middleware')(compiler, {
|
||||||
app.use(devMiddleWare);
|
app.use(devMiddleWare);
|
||||||
app.use(
|
app.use(
|
||||||
require('webpack-hot-middleware')(compiler, {
|
require('webpack-hot-middleware')(compiler, {
|
||||||
log: console.info
|
log: false
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -6,13 +6,12 @@ const threadLoader = require('thread-loader');
|
||||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||||
const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin');
|
const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin');
|
||||||
const AutoDllPlugin = require('autodll-webpack-plugin');
|
|
||||||
const HardSourceWebpackPlugin = require('hard-source-webpack-plugin');
|
|
||||||
const FaviconsWebpackPlugin = require('favicons-webpack-plugin');
|
const FaviconsWebpackPlugin = require('favicons-webpack-plugin');
|
||||||
const ExtractTextPlugin = require('extract-text-webpack-plugin');
|
// const AutoDllPlugin = require('autodll-webpack-plugin');
|
||||||
|
const HardSourceWebpackPlugin = require('hard-source-webpack-plugin');
|
||||||
const ProgressPlugin = require('webpack/lib/ProgressPlugin');
|
const ProgressPlugin = require('webpack/lib/ProgressPlugin');
|
||||||
const BabelMinifyPlugin = require('babel-minify-webpack-plugin');
|
|
||||||
const SriPlugin = require('webpack-subresource-integrity');
|
const SriPlugin = require('webpack-subresource-integrity');
|
||||||
|
const MiniCSSExtractPlugin = require('mini-css-extract-plugin');
|
||||||
const ClearDistPlugin = require('./plugins/clearDist');
|
const ClearDistPlugin = require('./plugins/clearDist');
|
||||||
const SortCachePlugin = require('./plugins/sortCache');
|
const SortCachePlugin = require('./plugins/sortCache');
|
||||||
|
|
||||||
|
@ -71,17 +70,18 @@ module.exports = function(opts = {}) {
|
||||||
rules.push(
|
rules.push(
|
||||||
{
|
{
|
||||||
test: /\.css$/,
|
test: /\.css$/,
|
||||||
use: ExtractTextPlugin.extract({
|
use: [
|
||||||
fallback: 'style-loader',
|
MiniCSSExtractPlugin.loader,
|
||||||
use: 'css-loader'
|
'css-loader'
|
||||||
})
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.scss$/,
|
test: /\.scss$/,
|
||||||
use: ExtractTextPlugin.extract({
|
use: [
|
||||||
fallback: 'style-loader',
|
MiniCSSExtractPlugin.loader,
|
||||||
use: ['css-loader', 'sass-loader']
|
'css-loader',
|
||||||
})
|
'sass-loader'
|
||||||
|
]
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
@ -186,24 +186,9 @@ module.exports = function(opts = {}) {
|
||||||
|
|
||||||
if (options.isProduction) {
|
if (options.isProduction) {
|
||||||
plugins.push(
|
plugins.push(
|
||||||
new BabelMinifyPlugin(
|
new MiniCSSExtractPlugin({
|
||||||
{
|
filename: '[name].[chunkhash:8].css'
|
||||||
// Mangle seems to be reusing variable identifiers, causing errors
|
|
||||||
mangle: false,
|
|
||||||
// These two on top of a lodash file are causing illegal characters for
|
|
||||||
// safari and ios browsers
|
|
||||||
evaluate: false,
|
|
||||||
propertyLiterals: false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
comments: false
|
|
||||||
}
|
|
||||||
),
|
|
||||||
new webpack.optimize.CommonsChunkPlugin({
|
|
||||||
name: 'vendor',
|
|
||||||
filename: 'vendor.[chunkhash:8].js'
|
|
||||||
}),
|
}),
|
||||||
new ExtractTextPlugin('[name].[chunkhash:8].css'),
|
|
||||||
new FaviconsWebpackPlugin({
|
new FaviconsWebpackPlugin({
|
||||||
logo: path.resolve(config.path.assets, 'images/favicon.png'),
|
logo: path.resolve(config.path.assets, 'images/favicon.png'),
|
||||||
background: '#163151',
|
background: '#163151',
|
||||||
|
@ -219,24 +204,23 @@ module.exports = function(opts = {}) {
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
plugins.push(
|
plugins.push(
|
||||||
new AutoDllPlugin({
|
// new AutoDllPlugin({
|
||||||
inject: true, // will inject the DLL bundles to index.html
|
// inject: true, // will inject the DLL bundles to index.html
|
||||||
filename: '[name]_[hash].js',
|
// filename: '[name]_[hash].js',
|
||||||
debug: true,
|
// debug: true,
|
||||||
context: path.join(config.path.root),
|
// context: path.join(config.path.root),
|
||||||
entry: {
|
// entry: {
|
||||||
vendor: [...config.vendorModules, 'babel-polyfill', 'bootstrap-sass', 'font-awesome']
|
// vendor: [...config.vendorModules, 'babel-polyfill', 'bootstrap-sass', 'font-awesome']
|
||||||
}
|
// }
|
||||||
}),
|
// }),
|
||||||
new HardSourceWebpackPlugin({
|
new HardSourceWebpackPlugin({
|
||||||
environmentHash: {
|
environmentHash: {
|
||||||
root: process.cwd(),
|
root: process.cwd(),
|
||||||
directories: ['webpack_config'],
|
directories: ['common/webpack_config'],
|
||||||
files: ['package.json']
|
files: ['package.json']
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
new webpack.HotModuleReplacementPlugin(),
|
new webpack.HotModuleReplacementPlugin(),
|
||||||
new webpack.NoEmitOnErrorsPlugin(),
|
|
||||||
new FriendlyErrorsPlugin()
|
new FriendlyErrorsPlugin()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -261,6 +245,17 @@ module.exports = function(opts = {}) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ====================
|
||||||
|
// === Optimization ===
|
||||||
|
// ====================
|
||||||
|
const optimization = {};
|
||||||
|
if (options.isProduction) {
|
||||||
|
optimization.splitChunks = {
|
||||||
|
chunks: 'all'
|
||||||
|
};
|
||||||
|
optimization.concatenateModules = false;
|
||||||
|
}
|
||||||
|
|
||||||
// ====================
|
// ====================
|
||||||
// ====== DevTool =====
|
// ====== DevTool =====
|
||||||
// ====================
|
// ====================
|
||||||
|
@ -295,6 +290,8 @@ module.exports = function(opts = {}) {
|
||||||
performance: {
|
performance: {
|
||||||
hints: options.isProduction ? 'warning' : false
|
hints: options.isProduction ? 'warning' : false
|
||||||
},
|
},
|
||||||
|
optimization,
|
||||||
|
mode: options.isProduction ? 'production' : 'development',
|
||||||
stats: {
|
stats: {
|
||||||
// Reduce build output
|
// Reduce build output
|
||||||
children: false,
|
children: false,
|
||||||
|
|
|
@ -1,20 +1,19 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
const chalk = require('chalk');
|
const chalk = require('chalk');
|
||||||
|
|
||||||
// this plugin if for loggin url after each time the compilation is done.
|
const LogPlugin = function(port) {
|
||||||
module.exports = class LogPlugin {
|
|
||||||
constructor(port) {
|
|
||||||
this.port = port;
|
this.port = port;
|
||||||
}
|
this.protocol = process.env.HTTPS ? 'https' : 'http';
|
||||||
|
};
|
||||||
|
|
||||||
apply(compiler) {
|
LogPlugin.prototype.apply = function(compiler) {
|
||||||
const protocol = process.env.HTTPS ? 'https' : 'http';
|
compiler.plugin('done', (compiler, done) => {
|
||||||
compiler.plugin('done', () => {
|
|
||||||
console.log(
|
console.log(
|
||||||
`> App is running at ${chalk.yellow(
|
`> App is running at ${chalk.yellow(
|
||||||
`${protocol}://localhost:${this.port}`
|
`${this.protocol}://localhost:${this.port}`
|
||||||
)}\n`
|
)}\n`
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
module.exports = LogPlugin;
|
||||||
|
|
|
@ -7,6 +7,7 @@ const makeConfig = require('./makeConfig');
|
||||||
|
|
||||||
const electronConfig = {
|
const electronConfig = {
|
||||||
target: 'electron-main',
|
target: 'electron-main',
|
||||||
|
mode: 'development',
|
||||||
entry: {
|
entry: {
|
||||||
main: path.join(config.path.electron, 'main/index.ts')
|
main: path.join(config.path.electron, 'main/index.ts')
|
||||||
},
|
},
|
||||||
|
|
|
@ -13,6 +13,8 @@ const jsConfig = makeConfig({
|
||||||
});
|
});
|
||||||
|
|
||||||
// Redefine plugins with prod specific stuff
|
// Redefine plugins with prod specific stuff
|
||||||
|
electronConfig.mode = 'production';
|
||||||
|
|
||||||
electronConfig.plugins = [
|
electronConfig.plugins = [
|
||||||
new ClearDistPlugin(),
|
new ClearDistPlugin(),
|
||||||
new webpack.DefinePlugin({
|
new webpack.DefinePlugin({
|
||||||
|
|
|
@ -5,6 +5,7 @@ const config = require('./config');
|
||||||
|
|
||||||
const freezerConfig = {
|
const freezerConfig = {
|
||||||
target: 'node',
|
target: 'node',
|
||||||
|
mode: 'development',
|
||||||
entry: './common/freezer',
|
entry: './common/freezer',
|
||||||
output: {
|
output: {
|
||||||
path: config.path.output,
|
path: config.path.output,
|
||||||
|
|
Loading…
Reference in New Issue