Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
This commit is contained in:
parent
93e3a48004
commit
b38dea0597
25901 changed files with 9982925 additions and 369 deletions
42
gaia/apps/communications/build/build.js
Executable file
42
gaia/apps/communications/build/build.js
Executable file
|
|
@ -0,0 +1,42 @@
|
|||
'use strict';
|
||||
|
||||
/* jshint node: true */
|
||||
|
||||
var utils = require('utils');
|
||||
var importBuild = require('import-config.js');
|
||||
var DEBUG = false;
|
||||
|
||||
var CommAppBuilder = function() {
|
||||
};
|
||||
|
||||
// Set destination directory and application directory
|
||||
CommAppBuilder.prototype.setOptions = function(options) {
|
||||
this.stageDir = utils.getFile(options.STAGE_APP_DIR);
|
||||
this.appDir = utils.getFile(options.APP_DIR);
|
||||
this.gaia = utils.gaia.getInstance(options);
|
||||
this.gaia.stageDir = this.stageDir;
|
||||
this.gaia.gaiaDir = options.GAIA_DIR;
|
||||
this.webapp = options.webapp;
|
||||
};
|
||||
|
||||
CommAppBuilder.prototype.generateManifest = function() {
|
||||
var manifestObject = importBuild.generateManifest(this.webapp, this.gaia);
|
||||
var file = utils.getFile(this.stageDir.path, 'manifest.webapp');
|
||||
var args = DEBUG ? [manifestObject, undefined, 2] : [manifestObject];
|
||||
utils.writeContent(file, JSON.stringify.apply(JSON, args));
|
||||
};
|
||||
|
||||
CommAppBuilder.prototype.generateAll = function() {
|
||||
this.generateManifest();
|
||||
importBuild.generateConfig('communications', 'contacts', this.gaia);
|
||||
};
|
||||
|
||||
CommAppBuilder.prototype.execute = function(options) {
|
||||
this.setOptions(options);
|
||||
this.generateAll();
|
||||
};
|
||||
|
||||
exports.execute = function(options) {
|
||||
utils.copyToStage(options);
|
||||
(new CommAppBuilder()).execute(options);
|
||||
};
|
||||
Loading…
Reference in a new issue