import cssnano from 'uppsta/options/cssnano';

function noop() {}

module.exports = function() {
  return [
    /*** Extensions::Language ***/
    require('postcss-import')({
      path: this.paths.styles.src
    }),
    require('postcss-sassy-mixins')(),
    require('postcss-advanced-variables')(),
    require('postcss-nested')(),
    /*** Shortcuts::Rules ***/
    require('postcss-media-minmax')(),
    /*** Shortcuts::Selectors ***/
    require('postcss-pseudo-class-any-link')(),
    require('postcss-quantity-queries')(),
    require('postcss-selector-matches')(),
    require('postcss-selector-not')(),
    require('postcss-short-data')({}),
    /*** Shortcuts::Properties ***/
    require('postcss-border')(),
    require('postcss-font-variant')(),
    require('postcss-short-position')(),
    require('postcss-short-spacing')(),
    require('postcss-size')(),
    /*** Shortcuts::Values ***/
    require('postcss-animation')(),
    require('postcss-easings')(),
    /*** Helpers::Fonts ***/
    require('postcss-font-magician')({
      hosted: `${this.paths.assets.dest}/fonts`
    }),
    require('postcss-responsive-type')(),
    /*** Helpers::Colors ***/
    require('postcss-hexrgba')(),
    /*** Helpers::Functions ***/
    require('postcss-strip-units')(),
    /*** Helpers::Browsers ***/
    require('postcss-clearfix')(),
    require('postcss-input-style')(),
    require('postcss-pseudoelements')(),
    require('autoprefixer')(),
    /*** Logistics ***/
    (this.env('!development', require('cssnano')(cssnano.bind(this)), noop)),
    require('postcss-reporter')({
      clearMessages: true,
      noIcon: true
    })
  ];
}
