Skip to content

Commit

Permalink
DApps (#5)
Browse files Browse the repository at this point in the history
* Add DApps pinning to local ipfs node

* Add DApps links to the main UI

* Electron logger

* Simplify build

* Switch to viem and query ENS contract directly

* Fix PID

* Update screenshot with DApps section

* "Staking V2"
  • Loading branch information
noisekit authored Apr 13, 2023
1 parent d89a8af commit cde6037
Show file tree
Hide file tree
Showing 38 changed files with 863 additions and 1,238 deletions.
20 changes: 2 additions & 18 deletions .erb/configs/webpack.config.main.prod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,11 @@
import path from 'path';
import webpack from 'webpack';
import { merge } from 'webpack-merge';
import TerserPlugin from 'terser-webpack-plugin';
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
import baseConfig from './webpack.config.base';
import webpackPaths from './webpack.paths';
import checkNodeEnv from '../scripts/check-node-env';
import deleteSourceMaps from '../scripts/delete-source-maps';

checkNodeEnv('production');
deleteSourceMaps();

const configuration: webpack.Configuration = {
devtool: 'source-map',
devtool: false,

mode: 'production',

Expand All @@ -36,19 +29,10 @@ const configuration: webpack.Configuration = {
},

optimization: {
minimizer: [
new TerserPlugin({
parallel: true,
}),
],
minimize: false,
},

plugins: [
new BundleAnalyzerPlugin({
analyzerMode: process.env.ANALYZE === 'true' ? 'server' : 'disabled',
analyzerPort: 8888,
}),

/**
* Create global constants which can be configured at compile time.
*
Expand Down
14 changes: 1 addition & 13 deletions .erb/configs/webpack.config.preload.dev.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
import path from 'path';
import webpack from 'webpack';
import { merge } from 'webpack-merge';
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
import baseConfig from './webpack.config.base';
import webpackPaths from './webpack.paths';
import checkNodeEnv from '../scripts/check-node-env';

// When an ESLint server is running, we can't set the NODE_ENV so we'll check if it's
// at the dev webpack config is not accidentally run in a production environment
if (process.env.NODE_ENV === 'production') {
checkNodeEnv('development');
}

const configuration: webpack.Configuration = {
devtool: 'inline-source-map',
devtool: false,

mode: 'development',

Expand All @@ -30,10 +22,6 @@ const configuration: webpack.Configuration = {
},

plugins: [
new BundleAnalyzerPlugin({
analyzerMode: process.env.ANALYZE === 'true' ? 'server' : 'disabled',
}),

/**
* Create global constants which can be configured at compile time.
*
Expand Down
3 changes: 0 additions & 3 deletions .erb/configs/webpack.config.renderer.dev.dll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ import { merge } from 'webpack-merge';
import baseConfig from './webpack.config.base';
import webpackPaths from './webpack.paths';
import { dependencies } from '../../package.json';
import checkNodeEnv from '../scripts/check-node-env';

checkNodeEnv('development');

const dist = webpackPaths.dllPath;

Expand Down
20 changes: 6 additions & 14 deletions .erb/configs/webpack.config.renderer.dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,6 @@ import { execSync, spawn } from 'child_process';
import ReactRefreshWebpackPlugin from '@pmmmwh/react-refresh-webpack-plugin';
import baseConfig from './webpack.config.base';
import webpackPaths from './webpack.paths';
import checkNodeEnv from '../scripts/check-node-env';

// When an ESLint server is running, we can't set the NODE_ENV so we'll check if it's
// at the dev webpack config is not accidentally run in a production environment
if (process.env.NODE_ENV === 'production') {
checkNodeEnv('development');
}

const port = process.env.PORT || 1212;
const manifest = path.resolve(webpackPaths.dllPath, 'renderer.json');
Expand All @@ -39,7 +32,7 @@ if (
}

const configuration: webpack.Configuration = {
devtool: 'inline-source-map',
devtool: false,

mode: 'development',

Expand All @@ -63,7 +56,7 @@ const configuration: webpack.Configuration = {
module: {
rules: [
{
test: /\.s?(c|a)ss$/,
test: /\.css$/,
use: [
'style-loader',
{
Expand All @@ -74,14 +67,13 @@ const configuration: webpack.Configuration = {
importLoaders: 1,
},
},
'sass-loader',
],
include: /\.module\.s?(c|a)ss$/,
include: /\.module\.css$/,
},
{
test: /\.s?css$/,
use: ['style-loader', 'css-loader', 'sass-loader'],
exclude: /\.module\.s?(c|a)ss$/,
test: /\.css$/,
use: ['style-loader', 'css-loader'],
exclude: /\.module\.css$/,
},
// Fonts
{
Expand Down
34 changes: 7 additions & 27 deletions .erb/configs/webpack.config.renderer.prod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,12 @@ import path from 'path';
import webpack from 'webpack';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
import CssMinimizerPlugin from 'css-minimizer-webpack-plugin';
import { merge } from 'webpack-merge';
import TerserPlugin from 'terser-webpack-plugin';
import baseConfig from './webpack.config.base';
import webpackPaths from './webpack.paths';
import checkNodeEnv from '../scripts/check-node-env';
import deleteSourceMaps from '../scripts/delete-source-maps';

checkNodeEnv('production');
deleteSourceMaps();

const configuration: webpack.Configuration = {
devtool: 'source-map',
devtool: false,

mode: 'production',

Expand All @@ -39,7 +31,7 @@ const configuration: webpack.Configuration = {
module: {
rules: [
{
test: /\.s?(a|c)ss$/,
test: /\.css$/,
use: [
MiniCssExtractPlugin.loader,
{
Expand All @@ -50,14 +42,13 @@ const configuration: webpack.Configuration = {
importLoaders: 1,
},
},
'sass-loader',
],
include: /\.module\.s?(c|a)ss$/,
include: /\.module\.css$/,
},
{
test: /\.s?(a|c)ss$/,
use: [MiniCssExtractPlugin.loader, 'css-loader', 'sass-loader'],
exclude: /\.module\.s?(c|a)ss$/,
test: /\.css$/,
use: [MiniCssExtractPlugin.loader, 'css-loader'],
exclude: /\.module\.css$/,
},
// Fonts
{
Expand Down Expand Up @@ -92,13 +83,7 @@ const configuration: webpack.Configuration = {
},

optimization: {
minimize: true,
minimizer: [
new TerserPlugin({
parallel: true,
}),
new CssMinimizerPlugin(),
],
minimize: false,
},

plugins: [
Expand All @@ -120,11 +105,6 @@ const configuration: webpack.Configuration = {
filename: 'style.css',
}),

new BundleAnalyzerPlugin({
analyzerMode: process.env.ANALYZE === 'true' ? 'server' : 'disabled',
analyzerPort: 8889,
}),

new HtmlWebpackPlugin({
filename: 'index.html',
template: path.join(webpackPaths.srcRendererPath, 'index.ejs'),
Expand Down
16 changes: 0 additions & 16 deletions .erb/scripts/check-node-env.js

This file was deleted.

11 changes: 0 additions & 11 deletions .erb/scripts/delete-source-maps.js

This file was deleted.

6 changes: 1 addition & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
module.exports = {
extends: [
'eslint:recommended',
'plugin:react/recommended',
//'plugin:@typescript-eslint/recommended'
],
extends: ['eslint:recommended', 'plugin:react/recommended'],
env: {
browser: true,
node: true,
Expand Down
10 changes: 0 additions & 10 deletions assets/assets.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,6 @@ declare module '*.jpg' {
export default content;
}

declare module '*.scss' {
const content: Styles;
export default content;
}

declare module '*.sass' {
const content: Styles;
export default content;
}

declare module '*.css' {
const content: Styles;
export default content;
Expand Down
Loading

0 comments on commit cde6037

Please sign in to comment.