mirror of
https://git.adityakumar.xyz/hugo-theme-even.git
synced 2025-02-23 04:20:01 +00:00
chore: add postcss-loader and autoprefixer (#13)
This commit is contained in:
parent
add55547f5
commit
3483df9d83
5 changed files with 21 additions and 21 deletions
|
@ -9,6 +9,7 @@
|
||||||
"author": "ahonn, olOwOlo",
|
"author": "ahonn, olOwOlo",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"autoprefixer": "^7.1.5",
|
||||||
"babel-core": "^6.26.0",
|
"babel-core": "^6.26.0",
|
||||||
"babel-loader": "^7.1.2",
|
"babel-loader": "^7.1.2",
|
||||||
"babel-plugin-transform-runtime": "^6.23.0",
|
"babel-plugin-transform-runtime": "^6.23.0",
|
||||||
|
@ -19,10 +20,11 @@
|
||||||
"extract-text-webpack-plugin": "^3.0.0",
|
"extract-text-webpack-plugin": "^3.0.0",
|
||||||
"file-loader": "^0.11.2",
|
"file-loader": "^0.11.2",
|
||||||
"node-sass": "^4.5.3",
|
"node-sass": "^4.5.3",
|
||||||
|
"postcss-loader": "^2.0.7",
|
||||||
"sass-loader": "^6.0.6",
|
"sass-loader": "^6.0.6",
|
||||||
"style-loader": "^0.18.2",
|
"style-loader": "^0.18.2",
|
||||||
"uglifyjs-webpack-plugin": "^0.4.6",
|
"uglifyjs-webpack-plugin": "^0.4.6",
|
||||||
"url-loader": "^0.5.9",
|
"url-loader": "^0.5.9",
|
||||||
"webpack": "^3.5.5"
|
"webpack": "^3.7.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
7
src/postcss.config.js
Normal file
7
src/postcss.config.js
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
module.exports = {
|
||||||
|
plugins: [
|
||||||
|
require('autoprefixer')({
|
||||||
|
browsers: ['> 1%', 'last 2 versions', 'ie >= 9']
|
||||||
|
})
|
||||||
|
]
|
||||||
|
}
|
|
@ -1,10 +1,10 @@
|
||||||
const path = require('path');
|
const path = require('path')
|
||||||
const ExtractTextPlugin = require("extract-text-webpack-plugin");
|
const ExtractTextPlugin = require("extract-text-webpack-plugin")
|
||||||
const UglifyJSPlugin = require('uglifyjs-webpack-plugin')
|
const UglifyJSPlugin = require('uglifyjs-webpack-plugin')
|
||||||
|
|
||||||
const extractSass = new ExtractTextPlugin({
|
const extractSass = new ExtractTextPlugin({
|
||||||
filename: `even.min.css`
|
filename: `even.min.css`
|
||||||
});
|
})
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
devtool: 'source-map',
|
devtool: 'source-map',
|
||||||
|
@ -26,31 +26,22 @@ module.exports = {
|
||||||
test: /\.scss$/,
|
test: /\.scss$/,
|
||||||
use: extractSass.extract({
|
use: extractSass.extract({
|
||||||
use: [{
|
use: [{
|
||||||
loader: 'css-loader',
|
loader: 'css-loader', options: {minimize: true, sourceMap: true}
|
||||||
options: {
|
|
||||||
minimize: true,
|
|
||||||
sourceMap: true
|
|
||||||
}
|
|
||||||
}, {
|
}, {
|
||||||
loader: 'sass-loader',
|
loader: 'postcss-loader', options: {sourceMap: true}
|
||||||
options: {
|
}, {
|
||||||
sourceMap: true
|
loader: 'sass-loader', options: {sourceMap: true}
|
||||||
}
|
|
||||||
}],
|
}],
|
||||||
fallback: 'style-loader'
|
fallback: 'style-loader'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /iconfont\.(woff|woff2|eot|ttf|otf|svg)$/,
|
test: /iconfont\.(woff|woff2|eot|ttf|otf|svg)$/,
|
||||||
use: [
|
use: ['file-loader?name=[path][name].[ext]?hash=[hash:7]']
|
||||||
'file-loader?name=[path][name].[ext]?hash=[hash:7]'
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /apple-chancery-webfont\.(woff|woff2|eot|ttf|otf|svg)$/,
|
test: /apple-chancery-webfont\.(woff|woff2|eot|ttf|otf|svg)$/,
|
||||||
use: [
|
use: ['file-loader?name=[path][name].[ext]']
|
||||||
'file-loader?name=[path][name].[ext]'
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
2
static/dist/even.min.css
vendored
2
static/dist/even.min.css
vendored
File diff suppressed because one or more lines are too long
2
static/dist/even.min.css.map
vendored
2
static/dist/even.min.css.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue