forked from ionic-team/ionic-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathresources.js
More file actions
39 lines (31 loc) · 822 Bytes
/
resources.js
File metadata and controls
39 lines (31 loc) · 822 Bytes
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
var argv = require('optimist').argv,
Task = require('./task').Task,
IonicAppLib = require('ionic-app-lib'),
IonicResources = IonicAppLib.resources,
IonicStats = require('./stats').IonicStats,
Utils = IonicAppLib.utils;
var Project = IonicAppLib.project;
var IonicTask = function() {};
IonicTask.prototype = new Task();
IonicTask.prototype.run = function() {
var dir = null,
project = null;
try {
dir = process.cwd();
project = Project.load(dir);
} catch (ex) {
return Utils.fail(ex, 'resources');
}
var options = argv;
options.platforms = argv._;
IonicResources.generate(dir, options)
.catch(function(ex) {
if (ex instanceof Error) {
Utils.fail(ex, 'resources');
}
});
IonicStats.t();
};
module.exports = {
IonicTask: IonicTask
}