How to use the minimist.type function in minimist

To help you get started, we’ve selected a few minimist examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github beiliao-web-frontend / scatter-map-toolkit / build / gulpfile.js View on Github external
const gulp = require('gulp');
const type = require('minimist')(process.argv.slice(2)).type;
const tasks = require('require-dir')('./tasks', {
	recurse: true,
	filter(fullPath) {
		// 如果是非开发环境则过滤掉watch的task
		return type === 'dev' || !/watch\.js$/.test(fullPath);
	}
});

let taskNames = [];

(function install(taskObj, parent = '') {

	for (let taskName in taskObj) {
		let taskItem = taskObj[taskName];
		let taskFullName = parent + taskName;