Skip to content

Commit

Permalink
Significantly simplifies codebase
Browse files Browse the repository at this point in the history
  • Loading branch information
drewthoennes committed Jul 22, 2019
1 parent 973fdb3 commit 66a5354
Show file tree
Hide file tree
Showing 53 changed files with 8,217 additions and 15,318 deletions.
12 changes: 0 additions & 12 deletions .babelrc

This file was deleted.

9 changes: 0 additions & 9 deletions .editorconfig

This file was deleted.

3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
NODE_ENV=
KEEN_PROJECT_ID=
KEEN_WRITE_KEY=
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
dist/

# Editor directories and files
.idea
Expand Down
10 changes: 0 additions & 10 deletions .postcssrc.js

This file was deleted.

2 changes: 1 addition & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
web: node index.js
web: node server.js
File renamed without changes.
41 changes: 0 additions & 41 deletions build/build.js

This file was deleted.

54 changes: 0 additions & 54 deletions build/check-versions.js

This file was deleted.

101 changes: 0 additions & 101 deletions build/utils.js

This file was deleted.

22 changes: 0 additions & 22 deletions build/vue-loader.conf.js

This file was deleted.

87 changes: 35 additions & 52 deletions build/webpack.base.conf.js
Original file line number Diff line number Diff line change
@@ -1,82 +1,65 @@
'use strict'
const path = require('path')
const utils = require('./utils')
const config = require('../config')
const vueLoaderConfig = require('./vue-loader.conf')
const path = require('path');
const { VueLoaderPlugin } = require('vue-loader');
const CopyWebpackPlugin = require('copy-webpack-plugin');

function resolve (dir) {
return path.join(__dirname, '..', dir)
}



module.exports = {
context: path.resolve(__dirname, '../'),
entry: {
app: './src/client/main.js'
app: './src/frontend/main.js'
},
output: {
path: config.build.assetsRoot,
filename: '[name].js',
publicPath: process.env.NODE_ENV === 'production'
? config.build.assetsPublicPath
: config.dev.assetsPublicPath
path: resolve('dist'),
filename: '[name].js'
},
resolve: {
extensions: ['.js', '.vue', '.json'],
alias: {
'vue$': 'vue/dist/vue.esm.js',
'@': resolve('src/client'),
'@': resolve('src/frontend'),
}
},
module: {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader',
options: vueLoaderConfig
loader: 'vue-loader'
},
{
test: /\.js$/,
loader: 'babel-loader',
include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')]
},
{
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('img/[name].[hash:7].[ext]')
}
},
{
test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('media/[name].[hash:7].[ext]')
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
babelrc: false,
presets: [
'@babel/preset-env'
],
cacheDirectory: true
}
}
},
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
}
test: /\.css$/,
use: [
'vue-style-loader',
{
loader: 'css-loader'
}
]
}
]
},
node: {
// prevent webpack from injecting useless setImmediate polyfill because Vue
// source contains it (although only uses it if it's native).
setImmediate: false,
// prevent webpack from injecting mocks to Node native modules
// that does not make sense for the client
dgram: 'empty',
fs: 'empty',
net: 'empty',
tls: 'empty',
child_process: 'empty'
}
plugins: [
new VueLoaderPlugin(),
new CopyWebpackPlugin([
{
from: resolve('static'),
to: resolve('dist'),
ignore: ['.*']
}
])
]
}
Loading

0 comments on commit 66a5354

Please sign in to comment.