This repository has been archived by the owner on Nov 3, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 968688 - Build sensors.json and support.json with settings/Makefile
- Loading branch information
Showing
6 changed files
with
98 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
'use strict'; | ||
|
||
/* global require, exports */ | ||
var utils = require('utils'); | ||
|
||
var SettingsAppBuilder = function(options) { | ||
}; | ||
|
||
SettingsAppBuilder.prototype.writeSupportsJSON = function(options) { | ||
var distDir = options.GAIA_DISTRIBUTION_DIR; | ||
|
||
var file = utils.getFile(options.GAIA_DIR, | ||
'apps', 'settings', 'resources', 'support.json'); | ||
var defaultContent = null; | ||
var content = utils.getDistributionFileContent('support', | ||
defaultContent, distDir); | ||
utils.writeContent(file, content); | ||
}; | ||
|
||
SettingsAppBuilder.prototype.writeSensorsJSON = function(options) { | ||
var distDir = options.GAIA_DISTRIBUTION_DIR; | ||
|
||
var file = utils.getFile(options.GAIA_DIR, | ||
'apps', 'settings', 'resources', 'sensors.json'); | ||
var defaultContent = { ambientLight: true }; | ||
var content = utils.getDistributionFileContent('sensors', | ||
defaultContent, distDir); | ||
utils.writeContent(file, content); | ||
}; | ||
|
||
SettingsAppBuilder.prototype.execute = function(options) { | ||
this.writeSensorsJSON(options); | ||
this.writeSupportsJSON(options); | ||
}; | ||
|
||
exports.execute = function(options) { | ||
(new SettingsAppBuilder()).execute(options); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{ "ambientLight": false } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"onlinesupport": { | ||
"href": "http://support.mozilla.org/", | ||
"title": "Mozilla Support" | ||
}, | ||
"callsupport": [ | ||
{ | ||
"href": "tel:12345678", | ||
"title": "Call Support 1" | ||
}, | ||
{ | ||
"href": "tel:87654321", | ||
"title": "Call Support 2" | ||
} | ||
] | ||
} |