VulpesOS/gaia/apps/clock/build/require_config.jslike
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

79 lines
2.1 KiB
Text
Executable file

{
appDir: '..',
baseUrl: 'js',
dir: '../../../build_stage/clock',
mainConfigFile: '../js/require_config.js',
paths: {
prim: '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',
// Build a separate module for each panel. Because the application
// consistently initializes with the `startup` module, this module and all
// its dependencies do not need to be included by the "secondary" panels
// ("Alarm Edit", "Timer", and "Stopwatch").
modules: [
{
name: 'startup',
include: ['panels/alarm/main']
},
{
name: 'onring'
},
{
name: 'panels/alarm_edit/main',
exclude: ['startup']
},
{
name: 'panels/timer/main',
exclude: ['startup']
},
{
name: 'panels/stopwatch/main',
exclude: ['startup']
}
],
// Set to 'uglify2' to get uglify to run using the
// uglify2 settings below.
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: true
},
compress: false,
mangle: false
},
// Rewrite the waitSeconds directive so that we never time out
// waiting for modules to load in production. See
// js/require_config.js for more details.
onBuildWrite: function(id, url, contents) {
if (id === 'require_config') {
return contents.replace(/waitSeconds:\s*\d+/, 'waitSeconds: 0');
} else {
return contents;
}
},
fileExclusionRegExp: /^\.|^test$|^build$/,
// Keeping build dir since Makefile cleans it up and
// preps build dir with the shared directory
keepBuildDir: true,
removeCombined: true
}