-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
51 lines (34 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
var devices = require('./config/devices.js');
module.exports = function (grunt) {
var device = grunt.option('device');
var target = grunt.option('target');
//GRUNT CONFIGUTATION
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
/* grunt-exec */
exec: devices[device].remove_content(),
/* grunt-contrib-copy */
copy: devices[device].copy(),
/* grunt-cordova-cli */
cordovacli: devices[device].cordova_cli(),
/* grunt-cordova-config */
cordova_config: devices[device].cordova_config()
});
/* GRUNT TASKS LIB */
grunt.loadNpmTasks('grunt-exec');
grunt.loadNpmTasks('grunt-cordovacli');
grunt.loadNpmTasks('grunt-cordova-config');
grunt.loadNpmTasks('grunt-contrib-copy');
/* GRUNT TASK COMMAND */
grunt.registerTask('app', [
'exec:remove_build_content',
'exec:add_build_dir',
'cordovacli:create',
'cordovacli:add_platform',
'cordovacli:add_plugins',
'cordova_config:target',
'exec:remove_www_content',
'copy',
'cordovacli:' + target
]);
};