Skip to content

wildbit/postcss-sorting-config-wildbit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

⚠️ Deprecated, as now stylelint-config-wildbit relies on stylelint-order plugin.

Wildbit-specific config for postcss-sorting

Sorts CSS properties in the order expected by stylelint-config-wildbit.

How to use

  1. Install dependencies:
npm install --save-dev postcss-scss postcss-sorting
npm install --save-dev wildbit/postcss-sorting-config-wildbit
  1. Update gulpfile.js:
var sorting = require('postcss-sorting');
var sortingConfig = require('./node_modules/postcss-sorting-config-wildbit/scss-sorting.json');

gulp.task('cleanup', function () {
  return gulp.src(paths.styles.src + '**/*.scss')
    .pipe(
      postcss(
        [
          sorting(sortingConfig)
        ],
        {
          syntax: require('postcss-scss')
        }
      )
    )
    .pipe(gulp.dest(paths.styles.src));
});
  1. Add to NPM scripts in package.json:
  "scripts": {
    "cleanup": "gulp cleanup"
  }
  1. Use correct media query @includes at your project:
    [
      "@include retina",
      "@include mobile",
      "@include tablet",
      "@include desktop"
    ]
  1. Run:
npm run cleanup

About

Wildbit-specific config for postcss-sorting

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published