summaryrefslogtreecommitdiff
path: root/assets/css/postcss.config.js
diff options
context:
space:
mode:
Diffstat (limited to 'assets/css/postcss.config.js')
-rw-r--r--assets/css/postcss.config.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/assets/css/postcss.config.js b/assets/css/postcss.config.js
new file mode 100644
index 0000000..e0d897c
--- /dev/null
+++ b/assets/css/postcss.config.js
@@ -0,0 +1,28 @@
+module.exports = conf => {
+ return {
+ plugins: [
+ // converts googleapis URLs to gstatic ones
+ require('postcss-import-url')({
+ recursive: true,
+ modernBrowser: true,
+ }),
+ // downloads gstatic fonts for local serving
+ require('postcss-font-grabber').postcssFontGrabber({
+ cssSrc: 'src',
+ cssDest: 'css',
+ fontDest: 'fonts',
+ }),
+ // main compatibility phase
+ require('postcss-preset-env')({
+ stage: 3,
+ }),
+ // must be run before autoprefixer
+ require('postcss-unprefix')(),
+ require('autoprefixer')(),
+ // does not /add/ prefixes by default, hence previous step
+ require('cssnano')({
+ preset: 'advanced'
+ }),
+ ]
+ };
+};