VulpesOS/gaia/apps/music/build/build.js
OverSu b38dea0597 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.
2026-09-30 23:13:03 +02:00

33 lines
967 B
JavaScript
Executable file

'use strict';
/* jshint node: true */
var utils = require('utils');
exports.execute = function(options) {
utils.copyToStage(options);
createConfigFile(options);
createMetadataScripts(options);
};
function createConfigFile(options) {
var targetPath = utils.joinPath(options.STAGE_APP_DIR, 'js', 'config.js');
var file = utils.getFile(targetPath);
var content = 'var SERVICE_WORKERS = ' +
(options.NGA_SERVICE_WORKERS === '1') + ';';
utils.writeContent(file, content);
}
function createMetadataScripts(options) {
var targetPath = utils.joinPath(options.STAGE_APP_DIR, 'js',
'metadata', 'metadata_scripts.js');
var sharedPath = utils.gaia.getInstance(options).sharedFolder.path;
var files = [
utils.joinPath(sharedPath, 'js', 'blobview.js'),
utils.joinPath(options.APP_DIR, 'js', 'metadata', 'formats.js'),
utils.joinPath(options.APP_DIR, 'js', 'metadata', 'core.js')
];
utils.concatenatedScripts(files, targetPath);
}