Squashing asset pipeline bugs and other stuff

1. Update dependencies
   - Add font-awesome as dependency
   - Switch to Bootstrap 4 dev branch
   - Remove eslint airbnb style (we're not using it)

2. Imported images and fonts should go into dist/images
   and dist/fonts, respectively

3. Only lint our own code, not external code (fixes #1633)
This commit is contained in:
QWp6t
2016-08-13 07:37:14 -07:00
parent 447c24d082
commit 4d58f88166
6 changed files with 24 additions and 21 deletions

View File

@@ -22,8 +22,8 @@ var scriptsFilename = (argv.release) ? 'scripts/[name]_[hash].js' : 'scripts/[na
jsLoader = {
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
loaders: [ 'babel?presets[]=es2015&cacheDirectory' ]
exclude: [ /(node_modules|bower_components)(?![/|\\](bootstrap|foundation-sites))/ ],
loaders: [ 'babel?presets[]='+path.resolve('./node_modules/babel-preset-es2015')+'&cacheDirectory' ]
};
if (argv.watch) { // '--watch' to add monkey-hot
@@ -53,7 +53,7 @@ var assetsPluginProcessOutput = function (assets) {
}
}
return JSON.stringify(results);
}
};
/**
* Loop through webpack entry
@@ -80,7 +80,7 @@ var addHotMiddleware = function (entry) {
}
}
return results;
}
};
webpackConfig = {
context: path.resolve(config.context),
@@ -94,7 +94,7 @@ webpackConfig = {
preLoaders: [
{
test: /\.js?$/,
exclude: /(node_modules|bower_components)/,
include: path.resolve('assets'),
loader: 'eslint'
}
],
@@ -120,7 +120,7 @@ webpackConfig = {
test: /\.(png|jpg|jpeg|gif)(\?.*)?$/,
loaders: [
'file?' + qs.stringify({
name: '[path][name].[ext]'
name: 'images/[name]_[md5:hash:hex:8].[ext]'
}),
'image-webpack?' + JSON.stringify({
bypassOnDebug:true,
@@ -141,7 +141,7 @@ webpackConfig = {
{
test: /\.(ttf|eot|svg)(\?.*)?$/,
loader: 'file?' + qs.stringify({
name: '[path][name].[ext]'
name: 'fonts/[name]_[md5:hash:hex:8].[ext]'
})
},
{
@@ -149,7 +149,7 @@ webpackConfig = {
loader: 'url?' + qs.stringify({
limit: 10000,
mimetype: "application/font-woff",
name: "[path][name].[ext]"
name: "fonts/[name]_[md5:hash:hex:8].[ext]"
})
}
]