-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
53 lines (48 loc) · 1.23 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
module.exports = function(grunt) {
var pot_keywords = ['gettext', '__', '_e', '_n:1,2', '_x:1,2c', '_ex:1,2c', '_nx:4c,1,2', 'esc_attr__', 'esc_attr_e', 'esc_attr_x:1,2c', 'esc_html__', 'esc_html_e', 'esc_html_x:1,2c', '_n_noop:1,2', '_nx_noop:3c,1,2', '__ngettext_noop:1,2'];
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
build: {
files: [{
expand: true,
cwd: 'js/',
src: ['*.js', '!*.min.js'],
dest: 'js/',
ext: '.min.js'
}]
}
},
pot: {
build: {
options: {
text_domain: 'bp_admin_global_profile_fields',
dest: 'languages/bp_admin_global_profile_fields.pot',
keywords: pot_keywords,
encoding: 'UTF-8',
package_name: 'buddypress-admin-global-profile-fields',
package_version: '',
msgid_bugs_address: 'nightbook.g.hyder@gmail.com',
comment_tag: 'translators:'
},
files: [{
expand: true,
cwd: '',
src: [
'*.php'
]
}]
}
},
watch: {
js: {
files: ['js/*', '!js/*.min.js'],
tasks: ['uglify']
}
}
});
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-pot');
grunt.registerTask('default', ['uglify', 'pot']);
};