-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathoptions.js
59 lines (48 loc) · 1.56 KB
/
options.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// Cli Routes
const axios = require('axios')
const CRA = require('./cliRoutes/CRA/cra')
const ReactRouter = require('./cliRoutes/reactrouter')
const StylingPackages = require('./cliRoutes/StylingPackages/index')
const ReactComponent = require('./cliRoutes/ReactComponent/mainReactComponent')
const PropTypes = require('./cliRoutes/propTypes')
const StateManagement = require('./cliRoutes/StateManagement/stateManagement')
const TypeScript = require('./cliRoutes/TypeScript/index')
const CustomPackageInstall = require('./cliRoutes/CustomPackageInstall')
const AccesibilityPackages = require('./cliRoutes/AccesibilityPackages')
const SearchOnline = require('./cliRoutes/CustomSearch')
module.exports = answers => {
switch (answers.installation) {
case 'Search Online':
new SearchOnline().search()
break
case 'CreateReactApp':
new CRA().CRAPrompt()
break
case 'ReactComponent':
new ReactComponent().componentPrompt()
break
case 'ReactRouter':
new ReactRouter().installOrUninstall()
break
case 'StylingPackages':
new StylingPackages().prompt()
break
case 'PropTypes':
new PropTypes().installOrUninstall()
break
case 'StateManagement':
new StateManagement().prompt()
break
case 'TypeScript':
new TypeScript().prompt()
break
case 'CustomPackageInstall':
new CustomPackageInstall().prompt()
break
case 'AccesibilityPackages':
new AccesibilityPackages().prompt()
break
default:
console.log('You must select an option!')
}
}