UNPKG

@nx/next

Version:

The Next.js plugin for Nx contains executors and generators for managing Next.js applications and libraries within an Nx workspace. It provides: - Scaffolding for creating, building, serving, linting, and testing Next.js applications. - Integration wit

16 lines (15 loc) 619 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createCliOptions = createCliOptions; function createCliOptions(obj) { return Object.entries(obj).reduce((arr, [key, value]) => { if (value !== undefined) { const kebabCase = key.replace(/[A-Z]/g, (m) => '-' + m.toLowerCase()); if (value === true || typeof value !== 'boolean') { // Boolean flags don't need a value (e.g. --debug) arr.push(`--${kebabCase}` + (typeof value !== 'boolean' ? `=${value}` : '')); } } return arr; }, []); }