This repository has been archived by the owner on Mar 9, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
39 lines (35 loc) · 1.76 KB
/
Gruntfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
module.exports = function (grunt) {
// Grunt project configuration.
grunt.initConfig({
sass: { // options for the sass compiler
options: {
compress: false, // don't minify the code
sourcemap: 'none' // don't create source maps
},
dist: {
src: 'sass/base.scss', // input sass file
dest: 'build/css/styles-compiled.css' // output css file
}
},
concat: { // options for the concat function
js: {
src: ['js/**/*.js'], // input - any file / folder in the js folder
dest: 'build/js/scripts.js', // output js file
}
},
watch: { // options for the watch function
js: { // a 'sub-function' I called js that only watches my js folder
files: ['js/**/*.js'], // 'watch' this folder
tasks: ['concat:js'] // if there are changes, run this task
},
css: { // a 'sub-function' I called css that only watches my csss folder
files: ['sass/**/*.scss'], // 'watch' this folder
tasks: ['sass'] // if there are changes, run this task
}
}
});
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('default', ['sass', 'concat', 'watch']); // setup the default Grunt tasks that are run when we run only 'grunt' in the terminal
};