| 2 | import { version } from '../package.json' |
| 3 | |
| 4 | export const interactive = async () => { |
| 5 | p.intro(`panda v${version}`) |
| 6 | |
| 7 | const initFlags = await p.group( |
| 8 | { |
| 9 | usePostcss: () => |
| 10 | p.select({ |
| 11 | message: 'Would you like to use PostCSS ?', |
| 12 | initialValue: 'yes', |
| 13 | options: [ |
| 14 | { value: 'yes', label: 'Yes' }, |
| 15 | { value: 'no', label: 'No' }, |
| 16 | ], |
| 17 | }), |
| 18 | useMjsExtension: () => |
| 19 | p.select({ |
| 20 | message: 'Use the mjs extension ?', |
| 21 | initialValue: 'yes', |
| 22 | options: [ |
| 23 | { value: 'yes', label: 'Yes' }, |
| 24 | { value: 'no', label: 'No' }, |
| 25 | ], |
| 26 | }), |
| 27 | jsxOptions: () => |
| 28 | p.group({ |
| 29 | styleProps: () => |
| 30 | p.select({ |
| 31 | message: 'Would you like to use JSX Style Props ?', |
| 32 | initialValue: 'yes', |
| 33 | options: [ |
| 34 | { value: 'yes', label: 'Yes' }, |
| 35 | { value: 'no', label: 'No' }, |
| 36 | ], |
| 37 | }), |
| 38 | jsxFramework: () => |
| 39 | p.select({ |
| 40 | message: 'What JSX framework?', |
| 41 | initialValue: 'react', |
| 42 | options: [ |
| 43 | { value: 'react', label: 'React' }, |
| 44 | { value: 'vue', label: 'Vue' }, |
| 45 | { value: 'solid', label: 'Solid' }, |
| 46 | { value: 'qwik', label: 'Qwik' }, |
| 47 | ], |
| 48 | }), |
| 49 | }), |
| 50 | whatSyntax: () => |
| 51 | p.select({ |
| 52 | message: 'What css syntax would you like to use?', |
| 53 | initialValue: 'object', |
| 54 | options: [ |
| 55 | { value: 'object-literal', label: 'Object' }, |
| 56 | { value: 'template-literal', label: 'Template literal' }, |
| 57 | ], |
| 58 | }), |
| 59 | withStrictTokens: () => |
| 60 | p.select({ |
| 61 | message: 'Use strict tokens to enforce full type-safety?', |