support sass 3.4.9, modify gruntfile.js and package.json, min html
Showing
15 changed files
with
150 additions
and
27 deletions
... | @@ -114,7 +114,122 @@ module.exports = function(grunt) { | ... | @@ -114,7 +114,122 @@ module.exports = function(grunt) { |
114 | src: '*.html' | 114 | src: '*.html' |
115 | } | 115 | } |
116 | }, | 116 | }, |
117 | sed: { | 117 | htmlmin: { |
118 | dist: { | ||
119 | options: { | ||
120 | removeComments: true, | ||
121 | collapseWhitespace: true, | ||
122 | removeEmptyAttributes: true, | ||
123 | removeCommentsFromCDATA: true, | ||
124 | removeRedundantAttributes: true, | ||
125 | collapseBooleanAttributes: true | ||
126 | }, | ||
127 | files: { | ||
128 | // Destination : Source | ||
129 | './htmlmin/index.html': './index.html', | ||
130 | './htmlmin/getting-started.html': './getting-started.html', | ||
131 | './htmlmin/free-psd.html': './free-psd.html', | ||
132 | './htmlmin/documentation.html': './documentation.html', | ||
133 | './htmlmin/color-picker.html': './color-picker.html', | ||
134 | './htmlmin/color-picker-blue.html': './color-picker-blue.html', | ||
135 | './htmlmin/color-picker-gray.html': './color-picker-gray.html', | ||
136 | './htmlmin/color-picker-green.html': './color-picker-green.html', | ||
137 | './htmlmin/color-picker-pink.html': './color-picker-pink.html', | ||
138 | './htmlmin/color-picker-purple.html': './color-picker-purple.html', | ||
139 | './htmlmin/color-picker-red.html': './color-picker-red.html', | ||
140 | './htmlmin/color-picker-yellow.html': './color-picker-yellow.html' | ||
141 | } | ||
142 | } | ||
143 | }, | ||
144 | jshint: { | ||
145 | /* | ||
146 | Note: | ||
147 | In case there is a /release/ directory found, we don't want to lint that | ||
148 | so we use the ! (bang) operator to ignore the specified directory | ||
149 | */ | ||
150 | files: ['Gruntfile.js', 'js/application.js'], | ||
151 | options: { | ||
152 | curly: true, | ||
153 | eqeqeq: true, | ||
154 | immed: true, | ||
155 | latedef: true, | ||
156 | newcap: true, | ||
157 | noarg: true, | ||
158 | sub: true, | ||
159 | undef: true, | ||
160 | boss: true, | ||
161 | eqnull: true, | ||
162 | browser: true, | ||
163 | |||
164 | globals: { | ||
165 | // AMD | ||
166 | module: true, | ||
167 | require: true, | ||
168 | requirejs: true, | ||
169 | define: true, | ||
170 | |||
171 | // Environments | ||
172 | console: true, | ||
173 | |||
174 | // General Purpose Libraries | ||
175 | $: true, | ||
176 | jQuery: true, | ||
177 | |||
178 | // Testing | ||
179 | sinon: true, | ||
180 | describe: true, | ||
181 | it: true, | ||
182 | expect: true, | ||
183 | beforeEach: true, | ||
184 | afterEach: true | ||
185 | } | ||
186 | } | ||
187 | }, | ||
188 | imagemin: { | ||
189 | png: { | ||
190 | options: { | ||
191 | optimizationLevel: 7 | ||
192 | }, | ||
193 | files: [ | ||
194 | { | ||
195 | expand: true, | ||
196 | cwd: './img/', | ||
197 | src: ['**/*.png'], | ||
198 | dest: './img/compressed/', | ||
199 | ext: '.png' | ||
200 | } | ||
201 | ] | ||
202 | }, | ||
203 | gif: { | ||
204 | options: { | ||
205 | optimizationLevel: 3 | ||
206 | }, | ||
207 | files: [ | ||
208 | { | ||
209 | expand: true, | ||
210 | cwd: './img/', | ||
211 | src: ['**/*.gif'], | ||
212 | dest: './img/compressed/', | ||
213 | ext: '.gif' | ||
214 | } | ||
215 | ] | ||
216 | }, | ||
217 | jpg: { | ||
218 | options: { | ||
219 | progressive: true | ||
220 | }, | ||
221 | files: [ | ||
222 | { | ||
223 | expand: true, | ||
224 | cwd: './img/', | ||
225 | src: ['**/*.jpg'], | ||
226 | dest: './img/compressed/', | ||
227 | ext: '.jpg' | ||
228 | } | ||
229 | ] | ||
230 | } | ||
231 | }, | ||
232 | sed: { | ||
118 | versionNumber: { | 233 | versionNumber: { |
119 | pattern: (function () { | 234 | pattern: (function () { |
120 | var old = grunt.option('oldver'); | 235 | var old = grunt.option('oldver'); |
... | @@ -131,11 +246,16 @@ module.exports = function(grunt) { | ... | @@ -131,11 +246,16 @@ module.exports = function(grunt) { |
131 | require('time-grunt')(grunt); | 246 | require('time-grunt')(grunt); |
132 | 247 | ||
133 | grunt.registerTask('task-css', ['sass', 'csscomb', 'cssmin']); | 248 | grunt.registerTask('task-css', ['sass', 'csscomb', 'cssmin']); |
249 | grunt.registerTask('task-html', ['htmlmin']); | ||
134 | grunt.registerTask('task-js', ['uglify']); | 250 | grunt.registerTask('task-js', ['uglify']); |
135 | grunt.registerTask('task', ['clean', 'task-css', 'task-js']); | 251 | grunt.registerTask('task-imagemin', ['imagemin']); |
252 | grunt.registerTask('task', ['clean', 'task-css', 'task-js','task-imagemin']); | ||
136 | grunt.registerTask('build', ['task']); | 253 | grunt.registerTask('build', ['task']); |
137 | grunt.registerTask('default', ['task']); | 254 | grunt.registerTask('default', ['task']); |
138 | grunt.registerTask('test', ['task', 'csslint', 'validation']); | 255 | grunt.registerTask('check-call', ['csslint', 'validation', 'jshint']); |
256 | grunt.registerTask('check-css', ['csslint']); | ||
257 | grunt.registerTask('check-html', ['validation']); | ||
258 | grunt.registerTask('check-js', ['jshint']); | ||
139 | 259 | ||
140 | // Version numbering task. | 260 | // Version numbering task. |
141 | // grunt change-version-number --oldver=A.B.C --newver=X.Y.Z | 261 | // grunt change-version-number --oldver=A.B.C --newver=X.Y.Z | ... | ... |
... | @@ -13,7 +13,7 @@ | ... | @@ -13,7 +13,7 @@ |
13 | 13 | ||
14 | BOOTFLAT is an open source Flat UI KIT based on Bootstrap 3.3.0 CSS framework. It provides a faster, easier and less repetitive way for web developers to create elegant web apps. | 14 | BOOTFLAT is an open source Flat UI KIT based on Bootstrap 3.3.0 CSS framework. It provides a faster, easier and less repetitive way for web developers to create elegant web apps. |
15 | 15 | ||
16 | Bootflat is built on the foundations of Bootstrap, visioned in a stunning flat design. Bootstrap itself is a trusted, reliable and proven tool for developers. Built with `Sass 3.3.9`. | 16 | Bootflat is built on the foundations of Bootstrap, visioned in a stunning flat design. Bootstrap itself is a trusted, reliable and proven tool for developers. Built with `Sass 3.4.9`. |
17 | 17 | ||
18 | Bootflat is compatible with the following browsers: `IE8, IE9, IE10, IE11, Firefox, Safari, Opera, Chrome`. | 18 | Bootflat is compatible with the following browsers: `IE8, IE9, IE10, IE11, Firefox, Safari, Opera, Chrome`. |
19 | 19 | ... | ... |
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff could not be displayed because it is too large.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
... | @@ -3,38 +3,41 @@ | ... | @@ -3,38 +3,41 @@ |
3 | "private": false, | 3 | "private": false, |
4 | "version": "2.0.4", | 4 | "version": "2.0.4", |
5 | "description": "BOOTFLAT is an open source Flat UI KIT based on Bootstrap 3.3.0 CSS framework. It provides a faster, easier and less repetitive way for web developers to create elegant web apps.", | 5 | "description": "BOOTFLAT is an open source Flat UI KIT based on Bootstrap 3.3.0 CSS framework. It provides a faster, easier and less repetitive way for web developers to create elegant web apps.", |
6 | "author":"Flathemes <info@flathemes.com>", | 6 | "author": "Flathemes <info@flathemes.com>", |
7 | "homepage": "http://bootflat.github.com/", | 7 | "homepage": "http://bootflat.github.com/", |
8 | "keywords": [ | 8 | "keywords": [ |
9 | "mobile", | 9 | "mobile", |
10 | "html5", | 10 | "html5", |
11 | "css3", | 11 | "css3", |
12 | "scss", | 12 | "scss", |
13 | "bootflat", | 13 | "bootflat", |
14 | "bootstrap", | 14 | "bootstrap", |
15 | "flat", | 15 | "flat", |
16 | "flat ui", | 16 | "flat ui", |
17 | "ui" | 17 | "ui" |
18 | ], | 18 | ], |
19 | "bugs": { | 19 | "bugs": { |
20 | "url": "https://github.com/bootflat/bootflat.github.io/issues" | 20 | "url": "https://github.com/bootflat/bootflat.github.io/issues" |
21 | }, | 21 | }, |
22 | "license": "MIT", | 22 | "license": "MIT", |
23 | "repository" : { | 23 | "repository": { |
24 | "type" : "git", | 24 | "type": "git", |
25 | "url" : "https://github.com/bootflat/bootflat.github.io.git" | 25 | "url": "https://github.com/bootflat/bootflat.github.io.git" |
26 | }, | 26 | }, |
27 | "devDependencies": { | 27 | "devDependencies": { |
28 | "grunt": "~0.4.4", | 28 | "grunt": "^0.4.5", |
29 | "grunt-contrib-clean": "~0.5.0", | 29 | "grunt-contrib-clean": "^0.6.0", |
30 | "grunt-contrib-csslint": "~0.2.0", | 30 | "grunt-contrib-csslint": "^0.3.1", |
31 | "grunt-contrib-cssmin": "~0.9.0", | 31 | "grunt-contrib-cssmin": "~0.9.0", |
32 | "grunt-contrib-uglify": "~0.4.0", | 32 | "grunt-contrib-htmlmin": "^0.3.0", |
33 | "grunt-contrib-imagemin": "^0.9.2", | ||
34 | "grunt-contrib-jshint": "^0.10.0", | ||
33 | "grunt-contrib-sass": "~0.7.3", | 35 | "grunt-contrib-sass": "~0.7.3", |
34 | "grunt-csscomb": "~2.0.1", | 36 | "grunt-contrib-uglify": "~0.4.0", |
35 | "grunt-html-validation": "~0.1.15", | 37 | "grunt-csscomb": "^3.0.0", |
36 | "grunt-sed": "~0.1.1", | 38 | "grunt-html-validation": "^0.1.18", |
37 | "load-grunt-tasks": "~0.4.0", | 39 | "grunt-sed": "^0.1.1", |
38 | "time-grunt": "~0.3.1" | 40 | "load-grunt-tasks": "^1.0.0", |
41 | "time-grunt": "^1.0.0" | ||
39 | } | 42 | } |
40 | } | 43 | } | ... | ... |
-
Please register or sign in to post a comment