-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.js
executable file
·64 lines (63 loc) · 1.67 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
module.exports = function(grunt) {
grunt.initConfig({
less: {
styles: {
options: {
cleancss: true
},
files: {
"docs/styles.css": "styles/styles.less"
}
},
},
uglify: {
scripts: {
files: {
"docs/styles.js": [
"node_modules/jquery/dist/jquery.min.js",
"node_modules/jquery-ui-dist/jquery-ui.min.js",
"node_modules/jquery-ui-touch-punch/jquery.ui.touch-punch.min.js",
"node_modules/bootstrap/js/*.js",
"styles/js/**/*.js"
]
}
}
},
copy: {
demos: {
expand: true,
cwd: 'styles/demos',
src: '**',
dest: 'docs/demos/'
},
fonts: {
expand: true,
cwd: 'node_modules/bootstrap/fonts',
src: '**',
dest: 'docs/fonts/'
},
prodStyles: {
src: 'docs/styles.css',
dest: 'lessons/web/share/jq/cav-ux.css'
},
prodScripts: {
src: 'docs/styles.js',
dest: 'lessons/web/share/jq/cav-ux.js'
},
prodFonts: {
expand: true,
cwd: 'docs/fonts',
src: '**',
dest: 'lessons/web/share/jq/fonts/'
}
},
clean: ['docs/']
});
grunt.loadNpmTasks('documentjs');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.registerTask('document', ['clean', 'documentjs', 'less', 'uglify', 'copy:demos', 'copy:fonts']);
grunt.registerTask('build', ['document', 'copy:prodStyles', 'copy:prodScripts', 'copy:prodFonts']);
};