module.exports = function(grunt) {
  'use strict'

  require('load-grunt-tasks')(grunt)
  require('time-grunt')(grunt)

  // project configuration
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),

    concat: {
      options: {
        banner: '@function brightness($color) {\n' +
                '  @return ((red($color) * .299) + (green($color) * .587) + (blue($color) * .114));\n' +
                '}\n' +
                '\n' +
                '@function color-chooser($dark, $light) {\n' +
                '  @if brightness($primary) > brightness($secondary) {\n' +
                '    @return $dark;\n' +
                '  } @else {\n' +
                '    @return $light;\n' +
                '  }\n' +
                '}\n' +
                '\n' +
                '@function color-dynamic($color) {\n' +
                '  @if lightness($color) > 75 {\n' +
                '    @return $primary;\n' +
                '  } @else {\n' +
                '    @return #ffffff;\n' +
                '  }\n' +
                '}\n' +
                '\n'
      },
      common: {
        dest: 'common/common.scss',
        src: '<%= sass.common.dest %>'
      },
      desktop: {
        dest: 'desktop/desktop.scss',
        src: '<%= sass.desktop.dest %>'
      },
      mobile: {
        dest: 'mobile/mobile.scss',
        src: '<%= sass.mobile.dest %>'
      }
    },

    postcss: {
      options: {
        map: false,
        processors: [
          require('autoprefixer')({
            browsers: [
              'Android 2.3',
              'Android >= 4',
              'Chrome >= 35',
              'Edge >= 12',
              'Explorer >= 10',
              'Firefox >= 38',
              'iOS >= 8',
              'Opera >= 12',
              'Safari >= 8'
            ]
          })
        ]
      },
      common: {
        src: 'common/common.scss'
      },
      desktop: {
        src: 'desktop/desktop.scss'
      },
      mobile: {
        src: 'mobile/mobile.scss'
      }
    },

    sass: {
      options: {
        precision: 6,
        sourcemap: 'none',
        style: 'expanded'
      },
      common: {
        dest: 'common/common.scss',
        src: 'scss/common.scss'
      },
      desktop: {
        dest: 'desktop/desktop.scss',
        src: 'scss/desktop.scss'
      },
      mobile: {
        dest: 'mobile/mobile.scss',
        src: 'scss/mobile.scss'
      }
    },

    scsslint: {
      options: {
        config: 'scss/.scss-lint.yml'
      },
      project: ['scss/**/*.scss']
    },

    // update package.json packages
    devUpdate: {
      default: {
        options: {
          semver: false,
          updateType: 'prompt'
        }
      }
    }
  })

  // task registration
  grunt.registerTask(
    'default',
    [
      'scsslint',
      'sass',
      'concat',
      'postcss'
    ]
  )
}

@@ -1547,19 +1547,51 @@
    '
-Android 2.3
+last 1 major version',%0A              '%3E= 1%25
 ',%0A 
@@ -1615,16 +1615,18 @@
 roid %3E= 
+4.
 4',%0A    
@@ -1646,17 +1646,17 @@
 rome %3E= 
-3
+4
 5',%0A    
@@ -1764,17 +1764,17 @@
 'iOS %3E= 
-8
+9
 ',%0A     
@@ -1788,26 +1788,26 @@
   'Opera %3E= 
-12
+30
 ',%0A         
@@ -1822,17 +1822,17 @@
 fari %3E= 
-8
+9
 '%0A      

Update browser list