-
Notifications
You must be signed in to change notification settings - Fork 237
/
Gruntfile.js
129 lines (126 loc) · 3.58 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
/* jshint node:true */
module.exports = function(grunt) {
var banner = grunt.file.read('src/banners/dist.js');
var pluginBanner = grunt.file.read('src/banners/plugins.js');
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
watch: {
all: {
files: ['src/**', 'test/components/*.js'],
tasks: ['default']
}
},
jshint: {
all: {
src: ['Gruntfile.js', 'src/**/*.js', 'test/components/*.js'],
options: {
jshintrc: '.jshintrc'
}
}
},
qunit: {
all: ['test/*.html']
},
concat: {
dist: {
options: {banner: banner},
files: [{
'dist/jmpress.js': [
'src/components/core.js',
'src/components/near.js',
'src/components/transform.js',
'src/components/active.js',
'src/components/circular.js',
'src/components/start.js',
'src/components/ways.js',
'src/components/ajax.js',
'src/components/hash.js',
'src/components/keyboard.js',
'src/components/viewport.js',
'src/components/mouse.js',
'src/components/mobile.js',
'src/components/templates.js',
'src/components/jqevents.js',
'src/components/animation.js'
],
'dist/jmpress.impress.js': [
'src/components/core.js',
'src/components/near.js',
'src/components/transform.js',
'src/components/active.js',
'src/components/circular.js',
'src/components/hash.js',
'src/components/keyboard.js',
'src/components/mouse.js'
]
}]
},
plugins: {
options: {banner: pluginBanner},
files: [{
'dist/jmpress.allplugins.js': [
'src/plugins/toggle.js',
'src/plugins/secondary.js',
'src/plugins/duration.js',
'src/plugins/presentation-mode.js'
],
'dist/jmpress.all.js': [
'dist/jmpress.js',
'dist/jmpress.allplugins.js'
],
'dist/plugins/jmpress.secondary.js': [
'src/plugins/secondary.js'
],
'dist/plugins/jmpress.toggle.js': [
'src/plugins/toggle.js'
],
'dist/plugins/jmpress.duration.js': [
'src/plugins/duration.js'
],
'dist/plugins/jmpress.presentation-mode.js': [
'src/plugins/presentation-mode.js'
]
}]
},
css: {
options: {banner: banner},
files: [{
'dist/basic-animations.css': ['src/css/animations/basic/*']
//'dist/advanced-animations.css': ['src/css/animations/advanced/*']
}]
}
},
uglify: {
options: {stripBanners: true, banner: banner},
dist: {
files: [{
'dist/jmpress.min.js': ['dist/jmpress.js'],
'dist/jmpress.impress.min.js': ['dist/jmpress.impress.js'],
'dist/jmpress.all.min.js': ['dist/jmpress.all.js']
}]
},
plugins: {
options: {stripBanners: true, banner: pluginBanner},
files: [{
'dist/jmpress.allplugins.min.js': ['dist/jmpress.allplugins.js'],
'dist/plugins/jmpress.secondary.min.js': ['dist/plugins/jmpress.secondary.js'],
'dist/plugins/jmpress.toggle.min.js': ['dist/plugins/jmpress.toggle.js'],
'dist/plugins/jmpress.duration.min.js': ['dist/plugins/jmpress.duration.js'],
'dist/plugins/jmpress.presentation-mode.min.js': ['dist/plugins/jmpress.presentation-mode.js']
}]
}
},
cssmin: {
all: {
files: [{
'dist/basic-animations.min.css': ['dist/basic-animations.css'],
'dist/demo.css': ['dist/basic-animations.css', 'src/css/demo/*.css'],
//'dist/advanced-animations.min.css': ['dist/advanced-animations.css']
}]
}
},
clean: ['dist/**/*']
});
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
grunt.registerTask('default', ['clean', 'jshint', 'concat', 'uglify', 'cssmin']);
};