summaryrefslogtreecommitdiff
path: root/assets/css/postcss.config.js
blob: c240dd514cc155aa6c0a994880bfd3130235a240 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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'
//      }),
    ]
  };
};