All Projects → cedaro → grunt-wp-css

cedaro / grunt-wp-css

Licence: MIT license
Format style sheets according to the WordPress CSS coding standards.

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to grunt-wp-css

My Wallet V3 Frontend
Blockchain Web Wallet Frontend
Stars: ✭ 192 (+433.33%)
Mutual labels:  grunt
TypeScript-AMD-Boilerplate
A TypeScript AMD Grunt Boilerplate with RequireJS
Stars: ✭ 46 (+27.78%)
Mutual labels:  grunt
phpcs-psr4-sniff
[READ-ONLY] PHP_CodeSniffer sniff that checks class name matches PSR-4 project structure.
Stars: ✭ 23 (-36.11%)
Mutual labels:  coding-standards
Grunt Image
Optimize PNG, JPEG, GIF, SVG images with grunt task.
Stars: ✭ 201 (+458.33%)
Mutual labels:  grunt
feweekly
⭐ 前端周刊,让你在前端领域跟上时代的脚步,深度和广度不断精进
Stars: ✭ 34 (-5.56%)
Mutual labels:  grunt
sprint tutorial
Tutorial and mock repository to teach people to contribute to open source
Stars: ✭ 18 (-50%)
Mutual labels:  coding-standards
Grunt Saucelabs
Grunt task for running all your browser tests using Sauce Labs
Stars: ✭ 182 (+405.56%)
Mutual labels:  grunt
grunt-frontend-boilerplate
🔒 Basic boilerplate to start a webapp project with Angular.js, Bootstrap and Grunt
Stars: ✭ 14 (-61.11%)
Mutual labels:  grunt
Twig-CS-Fixer
A tool to automatically fix Twig Coding Standards issues
Stars: ✭ 61 (+69.44%)
Mutual labels:  coding-standards
coding-standard
🐽 Tuned & very strict coding standards for PHP projects
Stars: ✭ 13 (-63.89%)
Mutual labels:  coding-standards
Grunt Recess
[DEPRECATED] Lint and minify CSS and LESS
Stars: ✭ 205 (+469.44%)
Mutual labels:  grunt
Grunt Webpack
integrate webpack into grunt build process
Stars: ✭ 249 (+591.67%)
Mutual labels:  grunt
danmallme
DanMall.me
Stars: ✭ 97 (+169.44%)
Mutual labels:  grunt
Barekit
A bare minimum responsive framework
Stars: ✭ 201 (+458.33%)
Mutual labels:  grunt
cscs
A curated list of Coding Style Conventions and Standards.
Stars: ✭ 1,486 (+4027.78%)
Mutual labels:  coding-standards
Hexo Theme Laughing
A lightweight hexo theme
Stars: ✭ 185 (+413.89%)
Mutual labels:  grunt
wpcs-docs
WordPress Coding Standards Docs
Stars: ✭ 59 (+63.89%)
Mutual labels:  coding-standards
grunt-angular-combine
Grunt task for combining AngularJS partials into a single HTML file.
Stars: ✭ 16 (-55.56%)
Mutual labels:  grunt
eslint-config
MOXY eslint configuration to be used across several JavaScript projects
Stars: ✭ 14 (-61.11%)
Mutual labels:  coding-standards
eslint-config-javascript
Write bulletproof JavaScript like a pro! 😎
Stars: ✭ 34 (-5.56%)
Mutual labels:  coding-standards

grunt-wp-css Build Status

Format style sheets according to the WordPress CSS coding standards.

Getting Started

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-wp-css --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks( 'grunt-wp-css' );

wpcss Task

Run this task with the grunt wpcss command.

Overview

In your project's Gruntfile, add a section named wpcss to the data object passed into grunt.initConfig().

grunt.initConfig({
    wpcss: {
        target: {
            options: {
                commentSpacing: true, // Whether to clean up newlines around comments between CSS rules.
                config: '',           // Which CSSComb config to use for sorting properties.
            },
            files: {}
        }
    }
});

This task supports the file mapping format Grunt supports. Please read Globbing patterns and Building the files object dynamically for additional details.

Options

options.commentSpacing

Type: Boolean
Default value: true
Optional

Whether the plugin should attempt to automatically correct spacing around comments that appear between rule declarations within the style sheet.

options.config

Type: String
Default value: 'default'

The CSSComb configuration to use for sorting CSS properties. Possible values are default or alphabetical.

Contributors

Thanks to Gary Jones of Gamajo Tech for researching and providing the default configuration rules, among many other improvements.

Release History

0.2.1

Updated peer dependencies to support Grunt 1.0. See #13

0.2.0

This is the @GaryJones release.

  • Updated the default CSScomb config (0887c06).
  • Updated the alphabetical CSScomb config to match improvements in the new default config.
  • Fixed the exports variable name in the tests.
  • Added Travis CI support.

0.1.0

  • Initial release.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].