Skip to content

Commit af1e697

Browse files
committed
Prettified the Gruntfile.js and included more extensive comments.
1 parent 4eb59bd commit af1e697

File tree

1 file changed

+36
-36
lines changed

1 file changed

+36
-36
lines changed

Gruntfile.js

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* Grunt Task configuration */
22
module.exports = function(grunt) {
33

4-
/* using jit-grunt for automatically loading all required plugins */
4+
/* Using jit-grunt for automatically loading all required plugins */
55
require('jit-grunt')(grunt);
66

77
grunt.initConfig({
@@ -20,56 +20,56 @@ module.exports = function(grunt) {
2020
}
2121
},
2222

23-
// PostCSS for adding prefixers and setting rem to pixels;
23+
// PostCSS for adding prefixers and setting rem to pixel
2424
postcss: {
2525
dist: {
2626
src: 'dist/css/styles.min.css'
2727
},
28-
options: {
28+
options: {
2929
// Rewrite and save sourcemap as seperate file
3030
map: {
3131
inline: false,
3232
annotation: 'styles/'
3333
},
3434
processors: [
35-
// add fallbacks for rem units
35+
// Add fallbacks for rem units
3636
require('pixrem')({
3737
atrules: true
3838
}),
39-
// add vendor prefixes
40-
require('autoprefixer')({ browsers: 'iOS >= 7, last 2 versions, ie > 7' }),
41-
// minify the result
39+
// Add vendor prefixes
40+
require('autoprefixer')({
41+
browsers: 'iOS >= 7, last 2 versions, ie > 7'
42+
}),
43+
// Minify the result
4244
require('cssnano')()
43-
]
44-
},
45-
},
46-
47-
watch: {
48-
files: 'scss/**/*.scss',
49-
tasks: ['sass', 'postcss'],
50-
options: {
51-
spawn: false,
52-
},
53-
},
45+
]
46+
}
47+
},
5448

55-
});
56-
/*
57-
* Grunt tasks
58-
* Run with grunt or grunt <command> in terminal
59-
*/
60-
grunt.registerTask('default', 'run');
61-
grunt.registerTask('run',
62-
[
63-
'sass',
64-
'postcss',
65-
'watch'
49+
// Watches for changes in your .scss-files and triggers the tasks sass and postcss.
50+
watch: {
51+
files: 'scss/**/*.scss',
52+
tasks: ['sass', 'postcss'],
53+
options: {
54+
spawn: false,
55+
}
56+
}
57+
})
6658

67-
]
59+
// Grunt Tasks
60+
// Run these by typing 'grunt' or 'grunt <command>' in your terminal.
61+
grunt.registerTask('default', 'run');
62+
grunt.registerTask('run',
63+
[
64+
'sass',
65+
'postcss',
66+
'watch'
67+
]
6868
);
69-
grunt.registerTask('create_css',
70-
[
71-
'sass',
72-
'postcss'
73-
]
69+
grunt.registerTask('create_css',
70+
[
71+
'sass',
72+
'postcss'
73+
]
7474
);
75-
};
75+
};

0 commit comments

Comments
 (0)