William O'Beirne 182eaa4329 Electron App (#854)
* Basic webpack build started.

* Get build working with electron-packager. Not fully satisfied, might investigate electron-builder.

* Custom title bar

* Rewrite all webpack configs to use common function. Organize webpack utils. Split into multiple dist folders.

* Replace electron build with electron-builder. Leave around packager for a bit.

* Check in progress on updater.

* Update modal flow.

* Fix tscheck.

* Adjust publish info.

* Arbitrary version bump.

* Bump version again.

* 5.0.2 bump fix autodownload.

* 5.0.2 bump again, readd dmg

* 5.0.3 bump

* Turn auto update back off. Log errors. Revert versions.

* Add os-specific builds. Improve update failure.

* Open external links in browser in electron.

* Remove custom title bar temporarily.

* Add info about the update download to the modal.

* Turn off development changes.

* Take the postBuild sorting script and move it into a webpack config.

* Initial conversion to typescript and electron-webpack.

* Switch from electron-webpack back to custom config, clean up unused code, typify electron bridge.

* Better typing for bridge.

* Remove unnecessary file.

* Reminify.

* Add shared folder resolving to jest config.

* Add enum to electron events
2018-01-22 17:38:06 -06:00

78 lines
1.7 KiB
JavaScript

'use strict';
const path = require('path');
const paths = {
root: path.join(__dirname, '../'),
src: path.join(__dirname, '../common'),
output: path.join(__dirname, '../dist'),
assets: path.join(__dirname, '../common/assets'),
static: path.join(__dirname, '../static'),
electron: path.join(__dirname, '../electron-app'),
shared: path.join(__dirname, '../shared'),
modules: path.join(__dirname, '../node_modules'),
}
module.exports = {
// Configuration
port: process.env.HTTPS ? 3443 : 3000,
title: 'MEW',
path: paths,
// Typescript rule config
typescriptRule: {
test: /\.(ts|tsx)$/,
include: [paths.src, paths.shared, paths.electron],
use: [{ loader: 'ts-loader', options: { happyPackMode: true, logLevel: 'info' } }],
exclude: ['assets', 'sass', 'vendor', 'translations/lang']
.map(dir => path.resolve(paths.src, dir))
.concat([paths.modules])
},
// File resolution
resolve: {
extensions: ['.ts', '.tsx', '.js', '.css', '.json', '.scss', '.less'],
modules: [
paths.src,
paths.modules,
paths.root,
]
},
// Vendor modules
vendorModules: [
'bip39',
'bn.js',
'classnames',
'ethereum-blockies',
'ethereumjs-abi',
'ethereumjs-tx',
'ethereumjs-util',
'ethereumjs-wallet',
'hdkey',
'idna-uts46',
'jsonschema',
'lodash',
'moment',
'normalizr',
'qrcode',
'qrcode.react',
'query-string',
'react',
'react-dom',
'react-markdown',
'react-redux',
'react-router-dom',
'react-router-redux',
'react-transition-group',
'redux',
'redux-logger',
'redux-promise-middleware',
'redux-saga',
'scryptsy',
'store2',
'uuid',
'wallet-address-validator',
'whatwg-fetch'
]
};