Skip to content
This repository has been archived by the owner on May 20, 2024. It is now read-only.

Commit

Permalink
- [grunt] integrated grunt-responsive-image for resizing and croping …
Browse files Browse the repository at this point in the history
…images, resolves #4
  • Loading branch information
mrhyde committed Sep 9, 2014
1 parent e0d99d2 commit 6518d69
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ node_js:
before_install:
- gem install sass
- npm install -g grunt-cli
- sudo add-apt-repository ppa:dhor/myway -y
- sudo apt-get update -q
- sudo apt-get install graphicsmagick -y
- npm config set spin=false
- npm config set loglevel=warn
notifications:
Expand Down
1 change: 1 addition & 0 deletions Gruntfile.coffee → gruntfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ module.exports = (grunt) ->
'uncss:build'
'csso:build'
'clean:styles'
'responsive_images:build'
'processhtml:build'
'size_report:build'
]
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Kotsu",
"version": "0.4.2",
"version": "0.4.3",
"title": "Clean, opinionated foundation for new projects — to boldly go where no man has gone before",
"author": "LotusTM",
"private": true,
Expand All @@ -17,6 +17,7 @@
"grunt-newer": "^0.7.0",
"grunt-nunjucks-2-html": "^0.2.1",
"grunt-processhtml": "^0.3.3",
"grunt-responsive-images": "^0.1.3",
"grunt-size-report": "^0.1.1",
"grunt-spritesmith": "^2.1.1",
"grunt-uncss": "^0.3.6",
Expand Down
19 changes: 19 additions & 0 deletions tasks/grunt-responsive-image.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
###
Responsive Images
https://github.com/andismith/grunt-responsive-images
Resizing and croping images with GraphicMagic
###
module.exports = ->
@config 'responsive_images',
build:
options:
sizes: [
name: 'thumbnails'
width: 240
]
files: [
expand: true
cwd: '<%= path.source.images %>/'
src: ['{,**}/*.{jpg,jpeg,gif,png}']
custom_dest: '<%= path.build.images %>/{%= name %}/'
]

0 comments on commit 6518d69

Please sign in to comment.