1
0
mirror of https://github.com/kremalicious/blowfish.git synced 2024-12-27 15:17:51 +01:00

move app files

This commit is contained in:
Matthias Kretschmann 2019-05-11 22:55:51 +02:00
parent 26894b8a07
commit 9d4a38dd61
Signed by: m
GPG Key ID: 606EEEF3C479A91F
38 changed files with 20 additions and 30 deletions

2
.gitignore vendored
View File

@ -1,5 +1,5 @@
node_modules
yarn.lock
package-lock.json
builds
build
dist

View File

@ -7,12 +7,13 @@
"scripts": {
"test": "eslint ./src/**/*.{js,jsx} && stylelint ./src/**/*.css",
"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",
"package": "npm run package:mac && npm run package:win && npm run package:linux && open ./builds",
"package:mac": "electron-packager . --overwrite --asar --platform=darwin --arch=x64 --icon=src/images/icon.icns --prune --out=./builds",
"package:linux": "electron-packager . --overwrite --asar --platform=linux --arch=x64 --icon=src/images/iconset/icon1024.png --prune --out=./builds",
"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\"",
"create-installer-mac": "electron-installer-dmg ./builds/Ocean-darwin-x64/Ocean.app Ocean --out=./builds --overwrite --icon=src/images/icon.icns"
"build": "webpack --mode production --config webpack.common.config.js",
"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/app/images/icon.icns --prune --out=./dist",
"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/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 ./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",
"author": "Matthias Kretschmann",
@ -48,6 +49,7 @@
"eslint-plugin-react": "^7.13.0",
"file-loader": "^3.0.1",
"html-webpack-plugin": "^3.2.0",
"npm-run-all": "^4.1.5",
"prettier": "^1.17.0",
"prettier-stylelint": "^0.4.2",
"style-loader": "^0.23.1",

View File

@ -1,7 +1,7 @@
import React, { PureComponent } from 'react'
import { AppContext } from '../store/createContext'
import Balance from './Balance'
import { prices } from '../../config'
import { prices } from '../config'
const calculateTotalBalance = (accounts, currency) => {
const balanceTotalArray = []

View File

Before

Width:  |  Height:  |  Size: 871 B

After

Width:  |  Height:  |  Size: 871 B

View File

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

View File

Before

Width:  |  Height:  |  Size: 145 KiB

After

Width:  |  Height:  |  Size: 145 KiB

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -1,6 +1,5 @@
import React from 'react'
import { render } from 'react-dom'
import App from './App'
document.body.style.backgroundColor = '#141414'

View File

@ -4,7 +4,7 @@ import ms from 'ms'
import Store from 'electron-store'
import { AppContext } from './createContext'
import fetchData from '../util/fetch'
import { refreshInterval, prices, oceanTokenContract } from '../../config'
import { refreshInterval, prices, oceanTokenContract } from '../config'
export default class AppProvider extends PureComponent {
static propTypes = {

View File

@ -40,7 +40,7 @@ const createWindow = async () => {
mainWindow.loadURL(
isDev
? 'http://localhost:8080'
: `file://${path.join(__dirname, '../dist/index.html')}`
: `file://${path.join(__dirname, '../build/index.html')}`
)
if (isDev) {

View File

@ -1,5 +1,5 @@
const { app, Menu } = require('electron')
const { openUrl } = require('./util/openUrl')
const { openUrl } = require('./app/util/openUrl')
const template = [
{

View File

@ -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
}
})

View File

@ -5,10 +5,11 @@ const HtmlWebpackPlugin = require('html-webpack-plugin')
const defaultInclude = [path.resolve(__dirname, 'src')]
module.exports = {
entry: path.resolve(__dirname, 'src') + '/index.js',
entry: path.resolve(__dirname, 'src') + '/app/index.js',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'bundle.js'
path: path.resolve(__dirname, 'build'),
filename: 'bundle.js',
publicPath: './'
},
module: {
rules: [

View File

@ -5,11 +5,13 @@ const { spawn } = require('child_process')
module.exports = Object.assign({}, common, {
mode: 'development',
output: {
path: path.resolve(__dirname, 'build'),
filename: 'bundle.js',
publicPath: '/'
},
devtool: 'cheap-source-map',
devServer: {
contentBase: path.resolve(__dirname, 'dist'),
contentBase: path.resolve(__dirname, 'build'),
stats: 'minimal',
before: () => {
spawn('electron', ['.'], {