UNPKG

@nomadmystic/wordpress-scaffold-cli

Version:

This project is created to speed up WordPress development

39 lines (38 loc) 1.18 kB
import { getInternalConfig } from '../utils/get-config.js'; import { scaffoldInternal } from '../scaffold/common/scaffold-internal.js'; import getCommonOptions from './common-options.js'; let pluginOptions = [ { type: 'input', name: 'name', message: 'What is the name of your plugin?', default: 'scaffold-plugin', }, { type: 'input', name: 'description', message: 'What would like the description of the plugin to be?', default: '', }, { type: 'list', name: 'frontEndFramework', message: 'What front-end framework would you like to add?', choices: ['None', 'Vue'], default: 'None', }, ]; const getPluginOptions = async () => { try { await scaffoldInternal(); let jsonFileParsed = await getInternalConfig('project/project-config.json'); const commonOptions = await getCommonOptions(jsonFileParsed); pluginOptions = pluginOptions.concat(commonOptions); return pluginOptions; } catch (err) { console.log('getPluginOptions()'); console.error(err); } }; export default getPluginOptions;