Skip to content

Commit 3f94bc0

Browse files
authored
Merge pull request #54 from KiFoundation/miniexplorer-grantsig-commissions-fixes
Miniexplorer grantsig commissions fixes
2 parents df4148d + 4392d3d commit 3f94bc0

File tree

23 files changed

+32673
-8082
lines changed

23 files changed

+32673
-8082
lines changed

app/.babelrc

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
{
22
"presets": [
3-
["babel-preset-env", { "modules": false }],
4-
"babel-preset-stage-2"
3+
[
4+
"@babel/preset-env",
5+
{
6+
"modules": false,
7+
"targets": {
8+
"browsers": ["> 1%", "last 2 versions", "not ie <= 8", "ie >= 11"]
9+
}
10+
}
11+
]
512
],
613
"plugins": [
7-
"babel-plugin-syntax-jsx",
8-
"babel-plugin-transform-runtime",
9-
"babel-plugin-transform-vue-jsx"
14+
"@babel/plugin-syntax-dynamic-import",
15+
"@babel/plugin-proposal-class-properties"
1016
],
1117
"comments": true
1218
}

app/.eslintrc

Lines changed: 23 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,29 @@
11
{
2-
"parser": "vue-eslint-parser",
2+
"env": {
3+
"browser": true,
4+
"commonjs": true,
5+
"es6": true,
6+
"node": true
7+
},
38
"parserOptions": {
49
"parser": "babel-eslint",
5-
"sourceType": "module"
10+
"sourceType": "module",
11+
"ecmaVersion": 2018
612
},
7-
"extends": [
8-
// add more generic rulesets here, such as:
9-
// "eslint:recommended",
10-
"plugin:vue/vue3-recommended"
11-
],
13+
"extends": ["eslint:recommended", "plugin:vue/recommended"],
1214
"rules": {
13-
// override/add rules settings here, such as:
14-
// 'vue/no-unused-vars': 'error'
15-
"vue/component-tags-order": [
16-
"error",
17-
{
18-
"order": ["template", "script", "style"]
19-
}
20-
],
21-
"vue/html-self-closing": [
22-
"error",
23-
{
24-
"html": {
25-
"void": "always",
26-
"normal": "always",
27-
"component": "always"
28-
},
29-
"svg": "always",
30-
"math": "always"
31-
}
32-
]
33-
}
15+
"no-unused-vars": "warn",
16+
"no-async-promise-executor": "warn",
17+
"no-empty": "warn",
18+
"no-redeclare": "warn",
19+
"no-extra-semi": "warn",
20+
"no-useless-escape": "warn",
21+
"no-undef": "warn",
22+
"no-global-assign": "warn",
23+
"no-unreachable": "warn",
24+
"no-prototype-builtins": "warn",
25+
"no-dupe-keys": "warn",
26+
"no-sparse-arrays": "warn"
27+
},
28+
"plugins": ["vue"]
3429
}

app/build/utils.js

Lines changed: 42 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,50 @@
1-
'use strict'
2-
const path = require('path')
3-
const config = require('../config')
4-
const ExtractTextPlugin = require('extract-text-webpack-plugin')
5-
const packageConfig = require('../package.json')
1+
'use strict';
2+
const path = require('path');
3+
const config = require('../config');
4+
const packageConfig = require('../package.json');
65

76
exports.assetsPath = function(_path) {
8-
const assetsSubDirectory = process.env.NODE_ENV === 'production' ?
9-
config.build.assetsSubDirectory :
10-
config.dev.assetsSubDirectory
7+
const assetsSubDirectory =
8+
process.env.NODE_ENV === 'production'
9+
? config.build.assetsSubDirectory
10+
: config.dev.assetsSubDirectory;
1111

12-
return path.posix.join(assetsSubDirectory, _path)
13-
}
12+
return path.posix.join(assetsSubDirectory, _path);
13+
};
1414

1515
exports.cssLoaders = function(options) {
16-
options = options || {}
16+
options = options || {};
1717

1818
const cssLoader = {
1919
loader: 'css-loader',
2020
options: {
21-
sourceMap: options.sourceMap
22-
}
23-
}
21+
sourceMap: options.sourceMap,
22+
},
23+
};
2424

2525
const postcssLoader = {
2626
loader: 'postcss-loader',
2727
options: {
28-
sourceMap: options.sourceMap
29-
}
30-
}
28+
sourceMap: options.sourceMap,
29+
},
30+
};
3131

3232
// generate loader string to be used with extract text plugin
3333
function generateLoaders(loader, loaderOptions) {
34-
const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader]
34+
const loaders = options.usePostCSS
35+
? [cssLoader, postcssLoader]
36+
: [cssLoader];
3537

3638
if (loader) {
3739
loaders.push({
3840
loader: loader + '-loader',
3941
options: Object.assign({}, loaderOptions, {
40-
sourceMap: options.sourceMap
41-
})
42-
})
42+
sourceMap: options.sourceMap,
43+
}),
44+
});
4345
}
4446

45-
// Extract CSS when that option is specified
46-
// (which is the case during production build)
47-
if (options.extract) {
48-
return ExtractTextPlugin.extract({
49-
use: loaders,
50-
fallback: 'vue-style-loader',
51-
publicPath: '../../'
52-
})
53-
} else {
54-
return ['vue-style-loader'].concat(loaders)
55-
}
47+
return ['vue-style-loader'].concat(loaders);
5648
}
5749

5850
// https://vue-loader.vuejs.org/en/configurations/extract-css.html
@@ -63,40 +55,40 @@ exports.cssLoaders = function(options) {
6355
sass: generateLoaders('sass', { indentedSyntax: true }),
6456
scss: generateLoaders('sass'),
6557
stylus: generateLoaders('stylus'),
66-
styl: generateLoaders('stylus')
67-
}
68-
}
58+
styl: generateLoaders('stylus'),
59+
};
60+
};
6961

7062
// Generate loaders for standalone style files (outside of .vue)
7163
exports.styleLoaders = function(options) {
72-
const output = []
73-
const loaders = exports.cssLoaders(options)
64+
const output = [];
65+
const loaders = exports.cssLoaders(options);
7466

7567
for (const extension in loaders) {
76-
const loader = loaders[extension]
68+
const loader = loaders[extension];
7769
output.push({
7870
test: new RegExp('\\.' + extension + '$'),
79-
use: loader
80-
})
71+
use: loader,
72+
});
8173
}
8274

83-
return output
84-
}
75+
return output;
76+
};
8577

8678
exports.createNotifierCallback = () => {
87-
const notifier = require('node-notifier')
79+
const notifier = require('node-notifier');
8880

8981
return (severity, errors) => {
90-
if (severity !== 'error') return
82+
if (severity !== 'error') return;
9183

92-
const error = errors[0]
93-
const filename = error.file && error.file.split('!').pop()
84+
const error = errors[0];
85+
const filename = error.file && error.file.split('!').pop();
9486

9587
notifier.notify({
9688
title: packageConfig.name,
9789
message: severity + ': ' + error.name,
9890
subtitle: filename || '',
99-
icon: path.join(__dirname, 'logo.png')
100-
})
101-
}
102-
}
91+
icon: path.join(__dirname, 'logo.png'),
92+
});
93+
};
94+
};

app/build/webpack.base.conf.js

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
const path = require('path');
33
const utils = require('./utils');
44
const config = require('../config');
5-
const vueLoaderConfig = require('./vue-loader.conf');
5+
const VueLoaderPlugin = require('vue-loader/lib/plugin');
66
const webpack = require('webpack');
7+
const HtmlWebpackPlugin = require('html-webpack-plugin');
78

89
function resolve(dir) {
910
return path.join(__dirname, '..', dir);
@@ -36,19 +37,12 @@ module.exports = {
3637
jquery: 'jquery',
3738
},
3839
},
39-
plugins: [
40-
new webpack.ProvidePlugin({
41-
$: 'jquery',
42-
jQuery: 'jquery',
43-
'window.jQuery': 'jquery',
44-
}),
45-
],
4640
module: {
4741
rules: [
4842
{
4943
test: /\.vue$/,
5044
loader: 'vue-loader',
51-
options: vueLoaderConfig,
45+
include: [resolve('src')],
5246
},
5347
{
5448
test: /\.js|.jsx$/,
@@ -95,6 +89,18 @@ module.exports = {
9589
},
9690
],
9791
},
92+
plugins: [
93+
new VueLoaderPlugin(),
94+
new HtmlWebpackPlugin({
95+
template: 'index.html',
96+
chunksSortMode: 'dependency',
97+
}),
98+
new webpack.ProvidePlugin({
99+
$: 'jquery',
100+
jQuery: 'jquery',
101+
'window.jQuery': 'jquery',
102+
}),
103+
],
98104
node: {
99105
// prevent webpack from injecting useless setImmediate polyfill because Vue
100106
// source contains it (although only uses it if it's native).

0 commit comments

Comments
 (0)