Skip to content

Commit c4f4b89

Browse files
committed
support sass 3.4.9, modify gruntfile.js and package.json, min html
1 parent be07dd7 commit c4f4b89

15 files changed

+200
-5235
lines changed

Gruntfile.js

Lines changed: 123 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,122 @@ module.exports = function(grunt) {
114114
src: '*.html'
115115
}
116116
},
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: {
118233
versionNumber: {
119234
pattern: (function () {
120235
var old = grunt.option('oldver');
@@ -131,11 +246,16 @@ module.exports = function(grunt) {
131246
require('time-grunt')(grunt);
132247

133248
grunt.registerTask('task-css', ['sass', 'csscomb', 'cssmin']);
249+
grunt.registerTask('task-html', ['htmlmin']);
134250
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']);
136253
grunt.registerTask('build', ['task']);
137254
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']);
139259

140260
// Version numbering task.
141261
// grunt change-version-number --oldver=A.B.C --newver=X.Y.Z

README.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
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.
1515

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`.
1717

1818
Bootflat is compatible with the following browsers: `IE8, IE9, IE10, IE11, Firefox, Safari, Opera, Chrome`.
1919

0 commit comments

Comments
 (0)