Skip to content

Commit 45111af

Browse files
committed
try some fixes
1 parent 696be8e commit 45111af

File tree

10 files changed

+45
-32
lines changed

10 files changed

+45
-32
lines changed

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!doctype html><html lang="en"><head><title>Mercurius</title><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><link rel="shortcut icon" href="/favicon.ico"><link rel="icon" href="/assets/images/logo-192.png"><link rel="apple-touch-icon" href="/assets/images/logo-180.png"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font@5.8.55/css/materialdesignicons.min.css"><script defer="defer" src="94.6a0f311422d377840829.js"></script><script defer="defer" src="mercurius.d13e8bd6fa68ef1407ef.js"></script><link href="mercurius.css" rel="stylesheet"></head><body><div id="app"></div></body></html>
1+
<!doctype html><html lang="en"><head><title>Mercurius</title><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><link rel="shortcut icon" href="favicon.ico"><link rel="icon" href="assets/images/logo-192.png"><link rel="apple-touch-icon" href="assets/images/logo-180.png"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font@5.8.55/css/materialdesignicons.min.css"><base href=""><script defer="defer" src="94.6a0f311422d377840829.js"></script><script defer="defer" src="mercurius.0a1670d5df558d7d4dd6.js"></script><link href="mercurius.css" rel="stylesheet"></head><body><div id="app"></div></body></html>

docs/mercurius.0a1670d5df558d7d4dd6.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/mercurius.d13e8bd6fa68ef1407ef.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"test": "webpack && node scripts/serve.js",
77
"start": "node scripts/serve.js",
88
"build": "webpack",
9-
"build-prod": "webpack --mode=production"
9+
"build-prod": "webpack --mode=production",
10+
"build-docs": "webpack --mode=production --env docs=true"
1011
},
1112
"private": true,
1213
"devDependencies": {
@@ -32,7 +33,7 @@
3233
"file-loader": "^6.2.0",
3334
"fork-ts-checker-webpack-plugin": "^6.5.0",
3435
"html-webpack-plugin": "^5.5.0",
35-
"mini-css-extract-plugin": "^2.4.6",
36+
"mini-css-extract-plugin": "^2.4.7",
3637
"postcss-loader": "^6.2.1",
3738
"process": "^0.11.10",
3839
"rollup-plugin-node-builtins": "^2.1.2",

src/app/app.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<nav class='navbar' role='navigation' aria-label='main navigation'>
44
<div class='navbar-brand'>
55
<router-link class='navbar-item hover-underline-child' to='/'>
6-
<img src='/assets/images/logo-48.png' alt='M'>
6+
<img src='assets/images/logo-48.png' alt='M'>
77
<span class='title is-5' style='position: relative'>Mercurius</span>
88
</router-link>
99
<a role='button' class='navbar-burger' :class='{ "is-active": showMenu }' aria-label='menu' aria-expanded='false' @click='showMenu = !showMenu'>

src/components/home/home.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
import Vue from 'vue';
2-
import { VVue } from '../../vvue';
2+
import { VVue } from '@/vvue';
33
import axios from 'axios';
44

55
import * as _ from 'lodash';
66
import { mapGetters } from 'vuex';
77
import { GaiaHubConfig } from 'blockstack/lib/storage/hub';
8-
import WrappedKeychain from 'data/wrapped-keychain';
98
import { decryptECIES } from 'blockstack/lib/encryption';
10-
import { makeV1GaiaAuthToken } from '@/util/token-util';
119
import * as JSZip from 'jszip';
1210
import * as FileSaver from 'file-saver';
13-
import defaultApps from '../../data/apps-defaults';
11+
12+
import defaultApps from '@/data/apps-defaults';
13+
import WrappedKeychain from '@/data/wrapped-keychain';
1414
import AppsNode from '@/data/apps-node';
1515

16+
import { makeV1GaiaAuthToken } from '@/util/token-util';
17+
1618
const CIPHER_OBJ_KEYS = ['iv', 'ephemeralPK', 'cipherText', 'mac', 'wasString'];
1719
const MORE_APPS = [
1820
{ name: 'Graphite (App)**', website: 'https://app.graphitedocs.com' },

src/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
<meta name="viewport" content="width=device-width, initial-scale=1">
77
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
88

9-
<link rel='shortcut icon' href='/favicon.ico'>
10-
<link rel='icon' href='/assets/images/logo-192.png'>
11-
<link rel='apple-touch-icon' href='/assets/images/logo-180.png'>
9+
<link rel='shortcut icon' href='favicon.ico'>
10+
<link rel='icon' href='assets/images/logo-192.png'>
11+
<link rel='apple-touch-icon' href='assets/images/logo-180.png'>
1212
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font@5.8.55/css/materialdesignicons.min.css">
1313
<!-- script type='module'>
1414
import { Buffer } from 'buffer';

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"compileOnSave": false,
33
"compilerOptions": {
44
"outDir": "./stage",
5-
"baseUrl": "src",
5+
"baseUrl": "./src",
66
"paths": {
77
"@/*": ["*"]
88
},

webpack.config.js

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,18 @@ const TerserJsPlugin = require('terser-webpack-plugin');
1414
module.exports = (env, argv) => {
1515

1616
const production = (env && env.production) || (argv && argv.mode == 'production') ? true : false;
17-
console.log('Environment:', (production ? 'Production' : 'Development') + '!')
17+
const docs = env && env.docs;
18+
const docsUrl = '';
19+
console.log('Environment:', (production ? 'Production' : 'Development') + (docs ? ' (docs)' : '') + '!')
1820
return {
1921
mode: production ? 'production' : 'development',
2022
entry: {
2123
'mercurius': path.resolve(__dirname, 'src', 'main.ts'),
2224
},
2325

2426
output: {
25-
path: path.resolve(__dirname, production ? 'build-prod' : 'build'),
27+
path: path.resolve(__dirname, docs ? 'docs' : production ? 'build-prod' : 'build'),
28+
publicPath: docs ? docsUrl : '',
2629
filename: '[name].[contenthash].js',
2730
},
2831

@@ -88,21 +91,27 @@ return {
8891
splitChunks: {
8992
chunks: 'all'
9093
},
91-
minimizer: [ new TerserJsPlugin({ terserOptions: { mangle: { reserved: [
92-
'Buffer',
93-
'BigInteger',
94-
'Point',
95-
'ECPubKey',
96-
'ECKey',
97-
'sha512_asm',
98-
'asm',
99-
'ECPair',
100-
'HDNode'
101-
] } } }) ]
94+
minimizer: [ new TerserJsPlugin({ terserOptions: {
95+
mangle: { reserved: [
96+
'Buffer',
97+
'BigInteger',
98+
'Point',
99+
'ECPubKey',
100+
'ECKey',
101+
'sha512_asm',
102+
'asm',
103+
'ECPair',
104+
'HDNode'
105+
] },
106+
sourceMap: production ? false : true
107+
} }) ]
102108
},
103109

104110
plugins: [
105-
// @ts-ignore
111+
new webpack.DefinePlugin({
112+
'production': Boolean(production),
113+
'docs': Boolean(docs)
114+
}),
106115
new webpack.ProvidePlugin({
107116
process: 'process/browser',
108117
Buffer: ['buffer', 'Buffer']
@@ -116,7 +125,8 @@ return {
116125
new HtmlWebpackPlugin({
117126
chunks: ['mercurius'],
118127
template: 'src/index.html',
119-
filename: 'index.html'
128+
filename: 'index.html',
129+
base: docs ? docsUrl : '/'
120130
}),
121131
new CopyWebpackPlugin({ patterns: [
122132
{ from: 'src/assets', to: 'assets' },

0 commit comments

Comments
 (0)