mmenu-js
Version:
The best javascript plugin for app look-alike on- and off-canvas menus with sliding submenus for your website and webapp.
36 lines (29 loc) • 628 B
JavaScript
const getOption = opt => {
var index = process.argv.indexOf('--' + opt);
if (index > -1) {
opt = process.argv[index + 1];
return opt && opt.slice(0, 2) !== '--' ? opt : false;
}
return false;
};
module.exports = findCustom => {
var dirs = {
input: 'src',
output: 'dist',
build: null
};
if (!findCustom) {
return dirs;
}
var i = getOption('i'),
o = getOption('o');
// Set custom input dir.
if (i) {
dirs.build = i;
}
// Set custom output dir.
if (o) {
dirs.output = o;
}
return dirs;
};