move app files
2
.gitignore
vendored
@ -1,5 +1,5 @@
|
|||||||
node_modules
|
node_modules
|
||||||
yarn.lock
|
yarn.lock
|
||||||
package-lock.json
|
package-lock.json
|
||||||
builds
|
build
|
||||||
dist
|
dist
|
||||||
|
14
package.json
@ -7,12 +7,13 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "eslint ./src/**/*.{js,jsx} && stylelint ./src/**/*.css",
|
"test": "eslint ./src/**/*.{js,jsx} && stylelint ./src/**/*.css",
|
||||||
"start": "webpack-dev-server --hot --host 0.0.0.0 --config=./webpack.dev.config.js",
|
"start": "webpack-dev-server --hot --host 0.0.0.0 --config=./webpack.dev.config.js",
|
||||||
"build": "webpack --config webpack.build.config.js && npm run package",
|
"build": "webpack --mode production --config webpack.common.config.js",
|
||||||
"package": "npm run package:mac && npm run package:win && npm run package:linux && open ./builds",
|
"package": "npm-run-all --parallel package:mac package:win package:linux && open ./dist",
|
||||||
"package:mac": "electron-packager . --overwrite --asar --platform=darwin --arch=x64 --icon=src/images/icon.icns --prune --out=./builds",
|
"package:mac": "electron-packager . --overwrite --asar --platform=darwin --arch=x64 --icon=src/app/images/icon.icns --prune --out=./dist",
|
||||||
"package:linux": "electron-packager . --overwrite --asar --platform=linux --arch=x64 --icon=src/images/iconset/icon1024.png --prune --out=./builds",
|
"package:linux": "electron-packager . --overwrite --asar --platform=linux --arch=x64 --icon=src/app/images/iconset/icon1024.png --prune --out=./dist",
|
||||||
"package:win": "electron-packager . --overwrite --asar --platform=win32 --arch=ia32 --icon=src/images/icon.ico --prune --out=./builds --version-string.CompanyName=CE --version-string.FileDescription=CE --version-string.ProductName=\"Ocean\"",
|
"package:win": "electron-packager . --overwrite --asar --platform=win32 --arch=ia32 --icon=src/app/images/icon.ico --prune --out=./dist --version-string.CompanyName=CE --version-string.FileDescription=CE --version-string.ProductName=\"Ocean\"",
|
||||||
"create-installer-mac": "electron-installer-dmg ./builds/Ocean-darwin-x64/Ocean.app Ocean --out=./builds --overwrite --icon=src/images/icon.icns"
|
"create-installer-mac": "electron-installer-dmg ./dist/Ocean-darwin-x64/Ocean.app Ocean --out=./dist --overwrite --icon=src/app/images/icon.icns",
|
||||||
|
"dist": "npm run build && npm run package"
|
||||||
},
|
},
|
||||||
"repository": "https://github.com/kremalicious/ocean-balance.git",
|
"repository": "https://github.com/kremalicious/ocean-balance.git",
|
||||||
"author": "Matthias Kretschmann",
|
"author": "Matthias Kretschmann",
|
||||||
@ -48,6 +49,7 @@
|
|||||||
"eslint-plugin-react": "^7.13.0",
|
"eslint-plugin-react": "^7.13.0",
|
||||||
"file-loader": "^3.0.1",
|
"file-loader": "^3.0.1",
|
||||||
"html-webpack-plugin": "^3.2.0",
|
"html-webpack-plugin": "^3.2.0",
|
||||||
|
"npm-run-all": "^4.1.5",
|
||||||
"prettier": "^1.17.0",
|
"prettier": "^1.17.0",
|
||||||
"prettier-stylelint": "^0.4.2",
|
"prettier-stylelint": "^0.4.2",
|
||||||
"style-loader": "^0.23.1",
|
"style-loader": "^0.23.1",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React, { PureComponent } from 'react'
|
import React, { PureComponent } from 'react'
|
||||||
import { AppContext } from '../store/createContext'
|
import { AppContext } from '../store/createContext'
|
||||||
import Balance from './Balance'
|
import Balance from './Balance'
|
||||||
import { prices } from '../../config'
|
import { prices } from '../config'
|
||||||
|
|
||||||
const calculateTotalBalance = (accounts, currency) => {
|
const calculateTotalBalance = (accounts, currency) => {
|
||||||
const balanceTotalArray = []
|
const balanceTotalArray = []
|
Before Width: | Height: | Size: 871 B After Width: | Height: | Size: 871 B |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 145 KiB After Width: | Height: | Size: 145 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
@ -1,6 +1,5 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { render } from 'react-dom'
|
import { render } from 'react-dom'
|
||||||
|
|
||||||
import App from './App'
|
import App from './App'
|
||||||
|
|
||||||
document.body.style.backgroundColor = '#141414'
|
document.body.style.backgroundColor = '#141414'
|
@ -4,7 +4,7 @@ import ms from 'ms'
|
|||||||
import Store from 'electron-store'
|
import Store from 'electron-store'
|
||||||
import { AppContext } from './createContext'
|
import { AppContext } from './createContext'
|
||||||
import fetchData from '../util/fetch'
|
import fetchData from '../util/fetch'
|
||||||
import { refreshInterval, prices, oceanTokenContract } from '../../config'
|
import { refreshInterval, prices, oceanTokenContract } from '../config'
|
||||||
|
|
||||||
export default class AppProvider extends PureComponent {
|
export default class AppProvider extends PureComponent {
|
||||||
static propTypes = {
|
static propTypes = {
|
@ -40,7 +40,7 @@ const createWindow = async () => {
|
|||||||
mainWindow.loadURL(
|
mainWindow.loadURL(
|
||||||
isDev
|
isDev
|
||||||
? 'http://localhost:8080'
|
? 'http://localhost:8080'
|
||||||
: `file://${path.join(__dirname, '../dist/index.html')}`
|
: `file://${path.join(__dirname, '../build/index.html')}`
|
||||||
)
|
)
|
||||||
|
|
||||||
if (isDev) {
|
if (isDev) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
const { app, Menu } = require('electron')
|
const { app, Menu } = require('electron')
|
||||||
const { openUrl } = require('./util/openUrl')
|
const { openUrl } = require('./app/util/openUrl')
|
||||||
|
|
||||||
const template = [
|
const template = [
|
||||||
{
|
{
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
const common = require('./webpack.common.config')
|
|
||||||
|
|
||||||
module.exports = Object.assign({}, common, {
|
|
||||||
mode: 'production',
|
|
||||||
output: {
|
|
||||||
publicPath: './'
|
|
||||||
},
|
|
||||||
stats: {
|
|
||||||
colors: true,
|
|
||||||
children: false,
|
|
||||||
chunks: false,
|
|
||||||
modules: false
|
|
||||||
}
|
|
||||||
})
|
|
@ -5,10 +5,11 @@ const HtmlWebpackPlugin = require('html-webpack-plugin')
|
|||||||
const defaultInclude = [path.resolve(__dirname, 'src')]
|
const defaultInclude = [path.resolve(__dirname, 'src')]
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
entry: path.resolve(__dirname, 'src') + '/index.js',
|
entry: path.resolve(__dirname, 'src') + '/app/index.js',
|
||||||
output: {
|
output: {
|
||||||
path: path.resolve(__dirname, 'dist'),
|
path: path.resolve(__dirname, 'build'),
|
||||||
filename: 'bundle.js'
|
filename: 'bundle.js',
|
||||||
|
publicPath: './'
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
rules: [
|
rules: [
|
||||||
|
@ -5,11 +5,13 @@ const { spawn } = require('child_process')
|
|||||||
module.exports = Object.assign({}, common, {
|
module.exports = Object.assign({}, common, {
|
||||||
mode: 'development',
|
mode: 'development',
|
||||||
output: {
|
output: {
|
||||||
|
path: path.resolve(__dirname, 'build'),
|
||||||
|
filename: 'bundle.js',
|
||||||
publicPath: '/'
|
publicPath: '/'
|
||||||
},
|
},
|
||||||
devtool: 'cheap-source-map',
|
devtool: 'cheap-source-map',
|
||||||
devServer: {
|
devServer: {
|
||||||
contentBase: path.resolve(__dirname, 'dist'),
|
contentBase: path.resolve(__dirname, 'build'),
|
||||||
stats: 'minimal',
|
stats: 'minimal',
|
||||||
before: () => {
|
before: () => {
|
||||||
spawn('electron', ['.'], {
|
spawn('electron', ['.'], {
|
||||||
|