lilacs
Version:
A web frontend building tool for teamwork, with automaticly compiling, merging, minifying, syncing files to server, supporting distributed servers, ensuring css or html files' inline reference with correct absolute path, and more.
27 lines (18 loc) • 806 B
JavaScript
var projectConfig = require('../../project_config');
var projectConfigs = require('../../project_config/configs');
var data = {
// current module index
currentModuleIndex: 0,
// current config
currentConfig: projectConfigs[0]
};
// next module
data.nextModule = (log) => {
if (!projectConfig.multiModules) return;
log && logger.success('task for module ' + projectConfig.modules[data.currentModuleIndex] + ' finished');
data.currentModuleIndex += 1;
data.currentModuleIndex >= projectConfig.modules.length && (data.currentModuleIndex = 0);
log && data.currentModuleIndex > 0 && logger.info('change current module to: ' + projectConfig.modules[data.currentModuleIndex]);
data.currentConfig = projectConfigs[data.currentModuleIndex];
};
module.exports = data;