Skip to content

Instantly share code, notes, and snippets.

@kwaledesign
Last active December 3, 2022 10:11
Show Gist options
  • Save kwaledesign/7515867 to your computer and use it in GitHub Desktop.
Save kwaledesign/7515867 to your computer and use it in GitHub Desktop.
Grunt tasks
# Frontend Ops
## Test Driven Stylesheets
Multiple layers of Sass/CSS testing
### Syntax checking
* Sass/Compass
### Sass Linting - coding standard compliance
* [SCSS-Lint](https://github.com/causes/scss-lint)
### CSS Linting - coding standard compliance
* [CSS-Lint](https://github.com/gruntjs/grunt-contrib-csslint)
### Styleguide
* [Dexy](https://dexy.it)
#### Object and Component Test Pages
* [Example}(http://suitcss.github.io/arrange/test.html)
### Visual Regression
* [Wraith](http://responsivenews.co.uk/post/56884056177/wraith)
### Layout Testing
* [Hardy](http://hardy.io/)
### Browser Reference Comparison
* [grunt-browserstack-tunnel](https://npmjs.org/package/grunt-browserstack-tunnel) - Start BrowserStack tunnel.
### CSS Analysis
* Grep / Ack scripts for CSS analytics [example](https://gist.github.com/kwaledesign/3813516)
* [grunt-css-metrics](https://npmjs.org/package/grunt-css-metrics) - Grunt task to analyse CSS files and log simple metrics.
### CSS Utilities
* [grunt-uncss](https://npmjs.org/package/grunt-uncss) - task for generating css files containing only those styles used in your project
* [Addy Osmani's version of ucss](https://github.com/addyosmani/grunt-uncss) - A grunt task for removing unused CSS from your project builds
* [grunt-ucss](https://npmjs.org/package/grunt-ucss) - Find unused and duplicate CSS - [more](https://github.com/operasoftware/ucss)
===
# Grunt Tasks:
## Default Tasks
* load-grunt-config
* Livereload
* clean
* compass
* usemin
---
## utility tasks
* grunt-dev-update
* time-grunt
* grunt-timer
* grunt-notify
* grunt-available-tasks
* grunt-newer
* grunt-parallel
* grunt-banner
---
## Test - run all testing tasks
* jshint
* csscss
* csshint
* [HTML inspector](https://github.com/philipwalton/html-inspector) - [more info](http://philipwalton.com/articles/introducing-html-inspector/)
## JS Test - run only JS testing tasks
* jshint
## CSS TEST - run only CSS testing tasks
* csshint
* scss lint
* css lint
* csscss
* ucss
* uncss
### CSS Stats
* grunt-css-metrics
* grunt-shell - [css analytics](https://gist.github.com/kwaledesign/3813516)
## Browser Testing
* grunt-browserstack-tunnel
### Grunt RWD screen shots
* [grunt-autoshot](https://github.com/Ferrari/grunt-autoshot)
---
## Style Guide - regenerate style guide and run all style guide tests
* grunt-shell - Dexy
* grunt-shell - Hardy
* grunt-shell - Wraith
---
## Performance
### Build
* htmlmin
* concat
* uglify
* cssmin
* [Grunt-class-id-minifier](https://npmjs.org/package/grunt-class-id-minifier) - Minify CSS classes and ID's
* imagemin
* svgmin
* copy?
* rev
* concurent (compass and jekyll)
* [Grunt-Zip](https://github.com/twolfson/grunt-zip) - Zip and unzip files via a grunt plugin
* [grunt-zip](https://npmjs.org/package/grunt-zip) - zip/unzip files via grunt
### Performance Testing
* [Grunt-Throttle](https://github.com/tjgq/grunt-throttle) - Performance Testing w/ Bandwidth Throttled
* [Grunt-Yslow](https://github.com/andyshora/grunt-yslow) - Test web page performance using the YSlow library invoked by a grunt task
* [Grunt-pagespeed](https://npmjs.org/package/grunt-pagespeed) - plugin for running google page-speed insights
* [grunt-yslow-test](https://npmjs.org/package/grunt-yslow-test) - runs yslow phantom script from a grunt task
* [Phantomas](https://github.com/macbre/phantomas) - PhantomJS-based web performance metrics collector
### Performance Analytics
* [Grunt-Bytesize](https://npmjs.org/package/grunt-bytesize) - Grunt plugin to output the filesize and gzip size of files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment