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 themeOptions = [ { type: 'input', name: 'themeName', message: 'What is the name of your theme?', default: 'scaffold-theme', }, { type: 'input', name: 'themeDescription', message: 'What would like the description of the theme be?', default: '', }, { type: 'list', name: 'frontEndFramework', message: 'What front-end framework would you like to add?', choices: ['None', 'Vue'], default: 'None', }, ]; const getThemeOptions = async () => { try { await scaffoldInternal(); let jsonFileParsed = await getInternalConfig('project/project-config.json'); const commonOptions = await getCommonOptions(jsonFileParsed); themeOptions = themeOptions.concat(commonOptions); return themeOptions; } catch (err) { console.log('getThemeOptions()'); console.error(err); } }; export default getThemeOptions;