This repository has been archived by the owner on Apr 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathGruntfile.js
89 lines (86 loc) · 2.16 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
var glob = require('glob');
module.exports = function(grunt)
{
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-eslint');
grunt.loadNpmTasks('grunt-prettier');
// load the configuration
grunt.initConfig({
eslint: {
options: {
configFile: '.eslintrc.json'
},
target: [
'app/index.js',
'app/**/*.js',
'!app/public/**/*.js'
]
},
concat: {
'app/public/js/main.js': ['src/plugins/jquery-search.js'].concat(glob.sync('src/widgets/*.js')),
'app/public/js/embed.js': [
"src/plugins/jquery-menuToggle.js",
"src/embed.js"
],
'app/public/js/libraries.js': [
"node_modules/jquery/dist/jquery.min.js",
"node_modules/bootstrap/dist/js/bootstrap.min.js",
"node_modules/bellhop-iframe/dist/bellhop.min.js",
"node_modules/springroll-container/dist/container.min.js",
"src/libs/jquery.autogrowtextarea.min.js",
"src/libs/jquery.mobile.custom.min.js"
]
},
less: {
main: {
'app/public/css/main.css': 'src/main.less'
},
embed: {
'app/public/css/embed.css': 'src/embed.less'
}
},
copy: {
libraries: {
files: [
{
expand: true,
flatten: true,
src: ['node_modules/bootstrap/dist/fonts//**'],
dest: 'app/public/fonts',
filter: 'isFile'
},
{
src: ['node_modules/bootstrap/dist/css/bootstrap.css'],
dest: 'app/public/css/libraries.css'
}
]
}
},
prettier: {
options: {
progress: true,
singleQuote: true
},
tests: {
src: [
'test/**/*.js'
]
},
// src: {
// src: [
// 'src/**/*.js',
// '!src/libs/*.js'
// ]
// },
// app: {
// src: [
// 'app/**/*.js',
// '!app/public/**'
// ]
// }
}
});
grunt.registerTask('default', ['copy', 'concat', 'less', 'eslint', 'prettier:tests']);
};