This repository has been archived by the owner on Feb 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathionic.js
80 lines (63 loc) · 2.4 KB
/
ionic.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
/***********************************************************
* \#\#\# Gulp Tasks - Ionic CLI Related \#\#\#
*
*
***********************************************************/
(function () {
"use strict";
var gulp = require('gulp');
//var gutil = require('gulp-util');
//var fs = require('fs');
//var path = require('path');
var shell = require('gulp-shell');
//var config = require('../config');
var cli = require('../cli');
var logger = require('../util/logger');
//var handleErr = require('../util/handleErr');
//var pathBuilder = require('../util/pathBuilder');
//var fileOP = require('../util/fileOP');
//----------------------------------------------------------
// Gulp Tasks
//----------------------------------------------------------
// ionic platform
gulp.task('add-ios', ['set-env'], shell.task([
'ionic platform add ios'
]));
gulp.task('remove-ios', ['set-env'], shell.task([
'ionic platform remove ios'
]));
gulp.task('add-android', ['set-env'], shell.task([
'ionic platform add android'
]));
gulp.task('remove-android', ['set-env'], shell.task([
'ionic platform remove android'
]));
// ionic state reset
// Reload all "Cordova" plugins.
// NOTE: This process does not run the "corfova hooks".
// If you do have the hooks, better run "remove" then "add".
gulp.task('reset', shell.task([
'ionic state reset'
]));
// ionic emulate [platform] -l -c
gulp.task('ionic-emulate', shell.task([
'ionic emulate ' + cli.emulatePlatform + ' --target="' + cli.emulatorDevice + '" --livereload --consolelogs'
]));
// ionic emulate [platform]
gulp.task('ionic-run', shell.task([
'ionic run ' + cli.runPlatform + ' --device'
]));
// ionic resources
gulp.task('icon', shell.task([
'ionic resources --icons'
]));
gulp.task('splash', shell.task([
'ionic resources --splash'
]));
gulp.task('resources', shell.task([
'ionic resources'
]));
//----------------------------------------------------------
// Internal Functions
//----------------------------------------------------------
}());