This commit is contained in:
Patrick Neff 2019-05-02 06:24:21 +02:00
parent 508ef6d534
commit d1250c6ded
7 changed files with 1736 additions and 2206 deletions

8
.editorconfig Normal file
View File

@ -0,0 +1,8 @@
root = true
[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = false
insert_final_newline = false

View File

@ -10,6 +10,7 @@ const presets = [
safari: "10",
},
useBuiltIns: "usage",
corejs: '3'
},
],
];

File diff suppressed because it is too large Load Diff

View File

@ -3,44 +3,45 @@
"version": "0.0.1",
"description": "A gohugo.io theme for http://www.neff-steindesign.de",
"scripts": {
"build": "webpack",
"watch": "webpack --watch"
"build": "webpack --config webpack.prod.js",
"watch": "webpack --watch --config webpack.dev.js"
},
"author": "",
"private": true,
"license": "MIT",
"dependencies": {
"@babel/polyfill": "^7.2.5",
"@fortawesome/fontawesome-free": "^5.6.3",
"@babel/polyfill": "^7.4.4",
"@fortawesome/fontawesome-free": "^5.8.1",
"core-js": "^3.0.1",
"vue": "^2.6.10"
},
"devDependencies": {
"@babel/cli": "^7.2.3",
"@babel/core": "^7.2.2",
"@babel/preset-env": "^7.2.3",
"@babel/cli": "^7.4.4",
"@babel/core": "^7.4.4",
"@babel/preset-env": "^7.4.4",
"@vue/web-component-wrapper": "^1.2.0",
"autoprefixer": "^9.4.3",
"babel-loader": "^8.0.4",
"clean-webpack-plugin": "^1.0.0",
"autoprefixer": "^9.5.1",
"babel-loader": "^8.0.5",
"clean-webpack-plugin": "^1.0.1",
"cookieconsent": "^3.1.0",
"css-loader": "^2.1.0",
"css-loader": "^2.1.1",
"css-validator-loader": "^1.1.3",
"file-loader": "^3.0.1",
"font-loader": "^0.1.2",
"image-webpack-loader": "^4.6.0",
"mini-css-extract-plugin": "^0.5.0",
"node-sass": "^4.11.0",
"optimize-css-assets-webpack-plugin": "^5.0.1",
"postcss-loader": "^3.0.0",
"postcss-preset-env": "^6.5.0",
"postcss-preset-env": "^6.6.0",
"prettier": "^1.17.0",
"sass": "^1.19.0",
"sass-loader": "^7.1.0",
"style-loader": "^0.23.1",
"uglifyjs-webpack-plugin": "^2.1.1",
"uglifyjs-webpack-plugin": "^2.1.2",
"url-loader": "^1.1.2",
"vue-loader": "^15.7.0",
"vue-template-compiler": "^2.6.10",
"webpack": "^4.28.2",
"webpack-cli": "^3.1.2"
"webpack": "^4.30.0",
"webpack-cli": "^3.3.1",
"webpack-merge": "^4.2.1"
}
}

View File

@ -1,7 +1,3 @@
const MiniCssExtractPlugin = require("mini-css-extract-plugin")
const CleanWebpackPlugin = require("clean-webpack-plugin")
const UglifyJsPlugin = require("uglifyjs-webpack-plugin")
const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin")
const VueLoaderPlugin = require("vue-loader/lib/plugin")
const path = require("path")
@ -11,10 +7,7 @@ module.exports = {
images: ["./src/js/images.js"],
style: ["./src/scss/main.scss"]
},
mode: "development",
devtool: "source-map",
context: __dirname,
devtool: "source-map",
output: {
filename: "js/[name].js",
path: __dirname + "/assets"
@ -33,13 +26,6 @@ module.exports = {
{
test: /\.(sa|sc|c)ss$/,
use: [
{
loader: MiniCssExtractPlugin.loader,
options: {
publicPath: "../",
sourceMap: true
}
},
{
loader: "css-loader",
options: {
@ -55,6 +41,7 @@ module.exports = {
{
loader: "sass-loader",
options: {
implementation: require("sass"),
sourceMap: true
}
}
@ -142,37 +129,6 @@ module.exports = {
]
},
plugins: [
new CleanWebpackPlugin([
"assets/css/*",
"assets/js/*",
"static/fonts/*",
"static/img/*"
]),
new MiniCssExtractPlugin({
// Options similar to the same options in webpackOptions.output
// both options are optional
filename: "css/[name].css",
chunkFilename: "css/[id].css"
}),
// make sure to include the plugin!
new VueLoaderPlugin()
],
optimization: {
usedExports: true,
minimizer: [
new UglifyJsPlugin({
cache: true,
parallel: true,
sourceMap: true // set to true if you want JS source maps
}),
new OptimizeCSSAssetsPlugin({
cssProcessorOptions: {
map: {
inline: false,
annotation: true
}
}
})
]
}
}

View File

@ -0,0 +1,7 @@
const merge = require('webpack-merge')
const common = require('./webpack.common.js')
module.exports = merge(common, {
mode: 'development',
devtool: 'source-maps'
})

View File

@ -0,0 +1,71 @@
const merge = require("webpack-merge")
const common = require("./webpack.common.js")
const MiniCssExtractPlugin = require("mini-css-extract-plugin")
const CleanWebpackPlugin = require("clean-webpack-plugin")
const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin")
module.exports = merge(common, {
mode: "production",
module: {
rules: [
{
test: /\.(sa|sc|c)ss$/,
use: [
{
loader: MiniCssExtractPlugin.loader,
options: {
publicPath: "../",
sourceMap: true
}
},
{
loader: "css-loader",
options: {
sourceMap: true
}
},
{
loader: "postcss-loader",
options: {
sourceMap: true
}
},
{
loader: "sass-loader",
options: {
implementation: require("sass"),
sourceMap: true
}
}
]
}
]
},
plugins: [
new CleanWebpackPlugin([
"assets/css/*",
"assets/js/*",
"static/fonts/*",
"static/img/*"
]),
new MiniCssExtractPlugin({
// Options similar to the same options in webpackOptions.output
// both options are optional
filename: "css/[name].css",
chunkFilename: "css/[id].css"
})
],
optimization: {
usedExports: true,
minimizer: [
new OptimizeCSSAssetsPlugin({
cssProcessorOptions: {
map: {
inline: false,
annotation: true
}
}
})
]
}
})