UNPKG

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.

21 lines (18 loc) 665 B
var _ = require('lodash'); const argv = require('../../data/argv'); module.exports = (config) => { // iterate argv _.forEach(argv, (value, key) => { // get real key, some key has alias var realKey = config.cmdAlias[key] ? config.cmdAlias[key] : key; // -e test, --env prod if (realKey == 'env' && config.envAlias && typeof config.envAlias[value] != 'undefined') config[realKey] = config.envAlias[value]; // `all` means `*` else if (realKey === 'module' && value === 'all') config[realKey] = '*'; else // normal occasion config[realKey] = value; }) };