forked from Automattic/o2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
64 lines (61 loc) · 1.14 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
/* global module */
module.exports = function(grunt) {
var cfg = {
pkg: grunt.file.readJSON('package.json'),
phplint: {
files: [
'*.php',
'**/*.php'
]
},
jshint: {
options: grunt.file.readJSON('.jshintrc'),
src: [
'js/**/*.js',
'modules/**/*.js',
// External libraries:
'!js/utils/caret.js',
'!js/utils/cocktail.js',
'!js/utils/enquire.js',
'!js/utils/jquery.highlight.js',
'!js/utils/jquery.hotkeys.js',
'!js/utils/jquery.placeholder.js',
'!js/utils/moment.js'
]
},
makepot: {
o2: {
options: {
domainPath: '/languages',
exclude: [
'node_modules'
],
mainFile: 'o2.php',
potFilename: 'o2.pot'
}
}
},
addtextdomain: {
o2: {
options: {
textdomain: 'o2'
},
files: {
src: [
'*.php',
'**/*.php',
'!node_modules/**'
]
}
}
}
};
grunt.initConfig( cfg );
grunt.loadNpmTasks('grunt-phplint');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-wp-i18n');
grunt.registerTask('default', [
'phplint',
'jshint'
]);
};