forked from GetScatter/ScatterEmbed
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 479a138
Showing
337 changed files
with
63,368 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
NO_WALLET=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.idea | ||
.env | ||
.npmrc | ||
node_modules | ||
build | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() | ||
] | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
// }) | ||
] | ||
}) |
Oops, something went wrong.