Make WordPress Core

Ticket #29792: 29792.2.diff

File 29792.2.diff, 1.6 KB (added by netweb, 11 years ago)
  • Gruntfile.js

     
    44                SOURCE_DIR = 'src/',
    55                BUILD_DIR = 'build/',
    66                autoprefixer = require('autoprefixer-core'),
     7                stylelint = require('stylelint'),
     8                reporter = require('postcss-reporter'),
     9                configWordPress = require('stylelint-config-wordpress'),
     10                assign = require('lodash.assign'),
     11                // change indentation to tabs and turn off the number-leading-zero rule
     12                myConfig = {
     13                        'rules': {
     14                                'rule-nested-empty-line-before': 0,
     15                                'rule-non-nested-empty-line-before': 0
     16                        }
     17                },
     18                // merge the configs together
     19                config = {
     20                        rules: assign(configWordPress.rules, myConfig.rules)
     21                },
    722                mediaConfig = {},
    823                mediaBuilds = ['audiovideo', 'grid', 'models', 'views'];
    924
     
    2338                postcss: {
    2439                        options: {
    2540                                processors: [
     41                                        stylelint(config),
    2642                                        autoprefixer({
    2743                                                browsers: ['Android >= 2.1', 'Chrome >= 21', 'Explorer >= 7', 'Firefox >= 17', 'Opera >= 12.1', 'Safari >= 6.0'],
    2844                                                cascade: false
     45                                        }),
     46                                        reporter({
     47                                                clearMessages: true
    2948                                        })
    3049                                ]
    3150                        },
  • package.json

     
    2929    "grunt-postcss": "~0.5.4",
    3030    "grunt-rtlcss": "~1.6.0",
    3131    "grunt-sass": "~1.0.0",
    32     "matchdep": "~0.3.0"
     32    "lodash.assign": "~3.2.0",
     33    "matchdep": "~0.3.0",
     34    "postcss-reporter": "~0.3.1",
     35    "stylelint": "~0.6.0",
     36    "stylelint-config-wordpress": "~0.1.0"
    3337  }
    3438}