-
Notifications
You must be signed in to change notification settings - Fork 0
/
gruntfile.js
99 lines (94 loc) · 2.33 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
module.exports = function(grunt){
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-compass');
grunt.loadNpmTasks('grunt-autoprefixer');
grunt.loadNpmTasks('grunt-contrib-imagemin');
grunt.loadNpmTasks('grunt-contrib-connect');
//grunt.loadNpmTasks('grunt-connect-livereload');
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
connect: {
server: {
options: {
port: 9001,
base: '.'
}//end options
}//end server
}, //end the connect
uglify: {
my_target:{
files: {
'_/js/scripts.js': ['_/components/js/scripts.js'],
'_/js/scripts2.js': ['_/components/js/testsvg.js'],
'_/js/testSrollmagic.js': ['_/components/js/testSrollmagic.js'],
'_/js/scriptsRotateSVG.js': ['_/components/js/scriptsRotateSVG.js']
}//end files
}//end My Target
},//end uglify
jshint: {
files: ['_/components/js/*.js', 'gruntfile.js'],
options: {
globals: {
jQuery: true,
console: true,
module: true
}//end globals
}///end options
},//end jshint
compass: {
dev: {
options: {
config: 'config.rb'
} //options
} //dev
}, //compass
autoperfixer: {
dist: {
files: {
'_/components/sass/*.scss': '_/css/styles.css'
}//end files
}//end dist
},// end autoperfixer
watch: {
options: { livereload: true},
scripts: {
files: ['_/components/js/*.js', 'gruntfile.js'],
tasks: ['uglify']
},//end scripts
sass: {
files: ['_/components/sass/*.scss'],
tasks: ['compass:dev']
},//end sass
styles: {
files: ['_/css/*.css'],
tasks: ['autoprefixer']
},//end styles
image_min: {
files: ['_/components/images/*.gif'],
tasks: ['imagemin']
},///image min
html: {
files: ['*.html']
}//end html
}//end watch
});//end initCofig
grunt.registerTask('imagemin', 'imagemin');
grunt.registerTask('test', 'jshint');
grunt.registerTask('default', ['connect', 'watch']);
};// end grunt
/*compass: {
dist: {
options: {
sassDir: '_/components/sass/*.scss',
cssDir: '_/css/*.css',
environment: 'production'
}//end options
}//end dist
/*dev:{
options: {
sassDir: ''
}//end options
}//end compass dev
},//end compass*/