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
49
gaia/apps/bluetooth/build/bluetooth.build.jslike
Executable file
49
gaia/apps/bluetooth/build/bluetooth.build.jslike
Executable file
|
|
@ -0,0 +1,49 @@
|
|||
{
|
||||
appDir: '..',
|
||||
baseUrl: 'js',
|
||||
mainConfigFile: '../js/config/require.js',
|
||||
dir: '../../../build_stage/bluetooth',
|
||||
|
||||
// Set the path to "empty" to prevent the scripts defining global objects
|
||||
// from being merged or they are removed after the optimization process,
|
||||
// which makes the objects inaccessible by reference.
|
||||
// If the inquiries to the object are all performed by requirejs, we can
|
||||
// remove the path of the object from the following list.
|
||||
paths: {
|
||||
'shared/bluetooth_helper': 'empty:'
|
||||
},
|
||||
|
||||
findNestedDependencies: true,
|
||||
|
||||
// Be sure to normalize all define() calls by extracting
|
||||
// dependencies so Function toString is not needed, and
|
||||
// lower capability devices like Tarako can optimize
|
||||
// memory by discarding function sources. This is
|
||||
// automatically done when an 'optimize' value other than
|
||||
// 'none' is used. This setting makes sure it happens for
|
||||
// builds where 'none' is used for 'optimize'.
|
||||
normalizeDirDefines: 'all',
|
||||
|
||||
// optimize is now passed via Makefile's GAIA_SETTINGS_MINIFY
|
||||
// default is none if not passed at all.
|
||||
// optimize: 'none',
|
||||
|
||||
// Just strip comments, no code compression or mangling.
|
||||
// Only active if optimize: 'uglify2'
|
||||
uglify2: {
|
||||
// Comment out the output section to get rid of line
|
||||
// returns and tabs spacing.
|
||||
output: {
|
||||
beautify: false
|
||||
},
|
||||
compress: true,
|
||||
mangle: true
|
||||
},
|
||||
|
||||
fileExclusionRegExp: /^\.|^test$|^build$/,
|
||||
|
||||
// Keeping build dir since Makefile cleans it up and
|
||||
// preps build dir with the shared directory
|
||||
keepBuildDir: true,
|
||||
removeCombined: true
|
||||
}
|
||||
43
gaia/apps/bluetooth/build/build.js
Executable file
43
gaia/apps/bluetooth/build/build.js
Executable file
|
|
@ -0,0 +1,43 @@
|
|||
'use strict';
|
||||
|
||||
/* jshint node: true */
|
||||
|
||||
var utils = require('utils');
|
||||
|
||||
exports.execute = function(options) {
|
||||
var appName = utils.basename(options.APP_DIR);
|
||||
var config = utils.getFile(options.APP_DIR, 'build',
|
||||
'bluetooth.build.jslike');
|
||||
var rjsPath = utils.joinPath(options.GAIA_DIR, 'build', 'r.js');
|
||||
var requirejs;
|
||||
|
||||
if (utils.isNode()) {
|
||||
requirejs = require(rjsPath);
|
||||
} else {
|
||||
var sandbox = utils.createSandbox();
|
||||
sandbox.arguments = [];
|
||||
sandbox.requirejsAsLib = true;
|
||||
sandbox.print = function() {
|
||||
utils.log(appName, Array.prototype.join.call(arguments, ' '));
|
||||
};
|
||||
utils.runScriptInSandbox(rjsPath, sandbox);
|
||||
requirejs = sandbox.requirejs;
|
||||
}
|
||||
|
||||
// logLevel set 4 for silent, set 0 for all
|
||||
var log = 'logLevel=' + (options.VERBOSE === '1' ? '0' : '4');
|
||||
var optimize = 'optimize=' +
|
||||
(options.GAIA_OPTIMIZE === '1' ? 'uglify2' : 'none');
|
||||
var build = new Promise(function(resolve, reject) {
|
||||
requirejs.optimize([config.path, optimize, log], resolve, reject);
|
||||
});
|
||||
|
||||
return build
|
||||
.then(function() {
|
||||
utils.log(appName, 'require.js optimize done');
|
||||
})
|
||||
.catch(function(err) {
|
||||
utils.log(appName, 'require.js optimize failed');
|
||||
utils.log(appName, err);
|
||||
});
|
||||
};
|
||||
Loading…
Reference in a new issue