Skip to content

Commit

Permalink
wipe history
Browse files Browse the repository at this point in the history
  • Loading branch information
nsjames committed Oct 3, 2019
0 parents commit 479a138
Show file tree
Hide file tree
Showing 337 changed files with 63,368 additions and 0 deletions.
Binary file added .DS_Store
Binary file not shown.
18 changes: 18 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"presets": [
[
"@babel/preset-env",
{
"modules": false
}
]
],
"plugins": [
"@babel/plugin-syntax-dynamic-import",
["@babel/plugin-transform-runtime",
{
"regenerator": true
}
]
]
}
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NO_WALLET=1
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.idea
.env
.npmrc
node_modules
build
dist
2 changes: 2 additions & 0 deletions .npmrc.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@fortawesome:registry=https://npm.fontawesome.com/
//npm.fontawesome.com/:_authToken=XXXX
5 changes: 5 additions & 0 deletions build/build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const rm = require('rimraf')

rm('./dist', done => {
require('./webpack.config.prod')
});
14 changes: 14 additions & 0 deletions build/utils.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
'use strict'

const path = require('path')

module.exports = {
resolve: function (dir) {
return path.join(__dirname, '..', dir)
},

assetsPath: function (_path) {
const assetsSubDirectory = 'static'
return path.posix.join(assetsSubDirectory, _path)
}
}
92 changes: 92 additions & 0 deletions build/webpack.config.base.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
'use strict'

const webpack = require('webpack')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const Dotenv = require('dotenv-webpack');
const { VueLoaderPlugin } = require('vue-loader')

const utils = require('./utils')

module.exports = {
entry : "./src/main.js",
//devtool: 'source-map',
resolve: {
extensions: ['.js', '.vue', '.json'],
modules: [
'node_modules'
],
alias: {
'vue$': 'vue/dist/vue.esm.js'
}
},
output: {
filename: '[name].bundle.js',
chunkFilename: '[name].bundle.js',
},

module: {
rules: [
{
test: /\.vue$/,
use: 'vue-loader'
}, {
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
}
}, {
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
use: {
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('img/[name].[hash:7].[ext]')
}
}
}, {
test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
use: {
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('media/[name].[hash:7].[ext]')
}
}
}, {
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
use: {
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
}
}
},
{
test: /\.scss$/,
use: [
'vue-style-loader',
'css-loader',
'sass-loader'
]
}
]
},
plugins: [
new HtmlWebpackPlugin({
filename: 'index.html',
template: 'index.html',
inject: true,
chunksSortMode: 'none'
}),
new VueLoaderPlugin(),
new CopyWebpackPlugin([{
from: utils.resolve('static'),
to: utils.resolve('dist/static'),
toType: 'dir'
}]),
new Dotenv()
]
}
50 changes: 50 additions & 0 deletions build/webpack.config.dev.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
'use strict'

const webpack = require('webpack')
const merge = require('webpack-merge')
const baseConfig = require('./webpack.config.base')
const Dotenv = require('dotenv-webpack');

const HOST = 'localhost'
const PORT = 8081

module.exports = merge(baseConfig, {
mode: 'development',

devServer: {
clientLogLevel: 'warning',
hot: true,
contentBase: 'dist',
compress: false,
host: HOST,
port: PORT,
open: false,
publicPath: '/',
},

module: {
rules: [
{
test: /\.css$/,
use: [
'vue-style-loader',
'css-loader'
]
}, {
test: /\.styl(us)?$/,
use: [
'vue-style-loader',
'css-loader',
'stylus-loader'
]
}
]
},

devtool: false,
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.SourceMapDevToolPlugin({}),
new Dotenv()
]
})
92 changes: 92 additions & 0 deletions build/webpack.config.prod.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
'use strict'

const webpack = require('webpack')
const merge = require('webpack-merge')
const baseConfig = require('./webpack.config.base')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
const rm = require('rimraf');
const TerserPlugin = require('terser-webpack-plugin');
const BrotliPlugin = require('brotli-webpack-plugin');

rm.sync('./dist')

module.exports = merge(baseConfig, {
mode: 'production',
devtool: '',
optimization: {
minimizer: [
new TerserPlugin({
cache: true,
parallel: true,
sourceMap: false, // Must be set to true if using source-maps in production
terserOptions: {
// https://github.com/webpack-contrib/terser-webpack-plugin#terseroptions
ecma: undefined,
warnings: false,
parse: {},
compress: {},
mangle: true, // Note `mangle.properties` is `false` by default.
module: false,
output: null,
toplevel: false,
nameCache: null,
ie8: false,
keep_classnames: undefined,
keep_fnames: false,
safari10: false,
}
})
],
namedModules: false,
namedChunks: false,
nodeEnv: 'production',
flagIncludedChunks: true,
occurrenceOrder: true,
sideEffects: true,
usedExports: true,
concatenateModules: true,
noEmitOnErrors: true,
checkWasmTypes: true,
minimize: true,
splitChunks: {
chunks: 'all',
cacheGroups: {
commons: {
test: /[\\/]node_modules[\\/]/,
name: 'vendor',
chunks: 'all',
// maxSize: 500000,
}
}
}
},
module: {
rules: [
{
test: /\.css?$/,
use: [
MiniCssExtractPlugin.loader,
'css-loader'
]
}
]
},
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': '"production"'
}),
new webpack.HashedModuleIdsPlugin(),
new MiniCssExtractPlugin({
filename: 'main.css'
}),

// TODO: Brotli will lower sizes considerably
// new BrotliPlugin({
// asset: '[path].br[query]',
// test: /\.(js|css|html|svg)$/,
// threshold: 10240,
// minRatio: 0.8
// })
]
})
Loading

0 comments on commit 479a138

Please sign in to comment.