starch 1.2.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 001260d36c04da6ab36e809b03a31fa0b3c201f3
4
- data.tar.gz: 0dc835c3969b979b421aec0f18642e14b9a47fae
3
+ metadata.gz: 472842e054ef224cf4f7f37bf97e52a0481bb5b2
4
+ data.tar.gz: baeb9d558cddbca51c48fbdc34275d4657ac0fb8
5
5
  SHA512:
6
- metadata.gz: 5cf3dd7e1b13d1d9f0ec852e2df3e137e4ee8eef5d45bd9b355c5765997a6129e3c051dfe7d29b3428efcd8b7cf7224daa223001c47baf10aea7291e45330d9b
7
- data.tar.gz: 77846452656d43ea9332bcce7bbbe2db779ba8753cb329620ec8ddc3cbdac4fceea7f61f13491aa198d0b77d94e1b360e60880e0b4c03c8ac90e3a993586583b
6
+ metadata.gz: 61905433d954f68c84b35e76b8e8345f0e7d9e4ce7d2f956bf420e571fe5a49ebd86b5b9ade4030b4f031f381830388ab7cce6300f8d8974ef65f6a114c82b77
7
+ data.tar.gz: 445ffd38b7d15c232844dd6a64dad20cb64a5d0488ff66b2319bec56f6de683280fa76af3cbdf969d81216449b911a48495d2573b0ba5b975a0ccbd0ed5e958d
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # Starch
2
2
  [![Gem Version](https://badge.fury.io/rb/starch.svg)](http://badge.fury.io/rb/starch)
3
3
  [![Code Climate](https://codeclimate.com/github/brianokeefe/starch.png)](https://codeclimate.com/github/brianokeefe/starch)
4
+ [![Build Status](https://travis-ci.org/brianokeefe/starch.svg?branch=master)](https://travis-ci.org/brianokeefe/starch)
4
5
 
5
6
  Starch is an opinionated skeleton generator for basic static site development.
6
7
  It will get you going on new sites quickly by generating the meat and *potatoes*
@@ -10,6 +11,7 @@ of your toolchain. Starch gets you:
10
11
  * Barebones `bower.json` and `package.json` files for easily saving bower and
11
12
  npm dependencies
12
13
  * Templates, partials, and helpers via Handlebars
14
+ * PNG, JPG, and GIF optimization
13
15
  * SASS compilation
14
16
  * JS uglification
15
17
  * Coffeescript compilation
@@ -78,9 +80,11 @@ like this:
78
80
  * The only SASS file that will be compiled is
79
81
  `app/assets/stylesheets/main.scss`. This file should be used to import the
80
82
  rest of your SASS.
81
- * Images, fonts, and any other static assets should live in `images`, `fonts`,
82
- and `files` (all in `app/assets`), respectively. These files will be copied
83
- 1:1 without any additional processing.
83
+ * Images in `app/assets/images/` with `.png`, `.jpg`, or `.gif` extensions will
84
+ be optimized and copied 1:1 into the destination directory.
85
+ * Fonts, and any other static assets should live in `fonts` and `files`
86
+ (located in `app/assets`), respectively. These files will be copied 1:1
87
+ without any additional processing.
84
88
 
85
89
  When your site is staged or built, the `assets` directory will be placed in the
86
90
  root of the destination directory, alongside the rendered contents of the
@@ -1,3 +1,3 @@
1
1
  module Starch
2
- VERSION = "1.2.0"
2
+ VERSION = "1.3.0"
3
3
  end
data/skel/Gruntfile.js CHANGED
@@ -30,7 +30,7 @@ module.exports = function(grunt) {
30
30
  files: [{
31
31
  expand: true,
32
32
  cwd: 'app',
33
- src: 'assets/{files,fonts,images}/**/*',
33
+ src: 'assets/{files,fonts}/**/*',
34
34
  dest: '<%= config.stagingDir %>'
35
35
  }]
36
36
  },
@@ -38,7 +38,7 @@ module.exports = function(grunt) {
38
38
  files: [{
39
39
  expand: true,
40
40
  cwd: 'app',
41
- src: 'assets/{files,fonts,images}/**/*',
41
+ src: 'assets/{files,fonts}/**/*',
42
42
  dest: '<%= config.buildDir %>'
43
43
  }]
44
44
  }
@@ -79,6 +79,24 @@ module.exports = function(grunt) {
79
79
  }]
80
80
  }
81
81
  },
82
+ imagemin:{
83
+ staging: {
84
+ files: [{
85
+ expand: true,
86
+ cwd: 'app',
87
+ src: 'assets/images/**/*.{png,jpg,gif}',
88
+ dest: '<%= config.stagingDir %>'
89
+ }]
90
+ },
91
+ build: {
92
+ files: [{
93
+ expand: true,
94
+ cwd: 'app',
95
+ src: 'assets/images/**/*.{png,jpg,gif}',
96
+ dest: '<%= config.buildDir %>'
97
+ }]
98
+ }
99
+ },
82
100
  sass: {
83
101
  staging: {
84
102
  files: [{
@@ -131,6 +149,11 @@ module.exports = function(grunt) {
131
149
  tasks: ['generator:staging'],
132
150
  options: { livereload: true }
133
151
  },
152
+ images: {
153
+ files: 'app/assets/images/**/*.{png,jpg,gif}',
154
+ tasks: ['imagemin:staging'],
155
+ options: { livereload: true }
156
+ },
134
157
  js: {
135
158
  files: 'app/assets/js/**/*.js',
136
159
  tasks: ['uglify:staging'],
@@ -142,7 +165,7 @@ module.exports = function(grunt) {
142
165
  options: { livereload: true }
143
166
  },
144
167
  static: {
145
- files: 'app/assets/{files,fonts,images}/**/*',
168
+ files: 'app/assets/{files,fonts}/**/*',
146
169
  tasks: ['copy:staging'],
147
170
  options: { livereload: true }
148
171
  }
@@ -152,6 +175,7 @@ module.exports = function(grunt) {
152
175
  grunt.loadNpmTasks('grunt-contrib-clean');
153
176
  grunt.loadNpmTasks('grunt-contrib-coffee');
154
177
  grunt.loadNpmTasks('grunt-contrib-copy');
178
+ grunt.loadNpmTasks('grunt-contrib-imagemin');
155
179
  grunt.loadNpmTasks('grunt-contrib-sass');
156
180
  grunt.loadNpmTasks('grunt-contrib-uglify');
157
181
  grunt.loadNpmTasks('grunt-contrib-watch');
@@ -159,7 +183,7 @@ module.exports = function(grunt) {
159
183
  grunt.loadNpmTasks('grunt-generator');
160
184
 
161
185
  grunt.registerTask('serve', ['stage', 'express', 'watch']);
162
- grunt.registerTask('stage', ['clean:staging', 'generator:staging', 'copy:staging', 'sass:staging', 'coffee:staging', 'uglify:staging']);
163
- grunt.registerTask('build', ['clean:build', 'generator:build', 'copy:build', 'sass:build', 'coffee:build', 'uglify:build']);
186
+ grunt.registerTask('stage', ['clean:staging', 'generator:staging', 'copy:staging', 'imagemin:staging', 'sass:staging', 'coffee:staging', 'uglify:staging']);
187
+ grunt.registerTask('build', ['clean:build', 'generator:build', 'copy:build', 'imagemin:build', 'sass:build', 'coffee:build', 'uglify:build']);
164
188
  };
165
189
 
data/skel/package.json.tt CHANGED
@@ -8,6 +8,7 @@
8
8
  "grunt-contrib-clean": "^0.5.0",
9
9
  "grunt-contrib-coffee": "^0.10.1",
10
10
  "grunt-contrib-copy": "^0.5.0",
11
+ "grunt-contrib-imagemin": "^0.7.1",
11
12
  "grunt-contrib-sass": "^0.7.3",
12
13
  "grunt-contrib-uglify": "^0.5.0",
13
14
  "grunt-contrib-watch": "^0.6.1",
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: starch
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian O'Keefe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-24 00:00:00.000000000 Z
11
+ date: 2014-07-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor