Skip to content

Commit aba6fc2

Browse files
Merge pull request #7 from TeamProjectsReact/v5.0.0/Updating
V5.0.0/updating
2 parents 323d0e3 + 6497bc1 commit aba6fc2

File tree

4 files changed

+396
-13
lines changed

4 files changed

+396
-13
lines changed

README.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,28 @@
1-
# Login SignUp React Template
1+
# Login SignUp React
22

33
- This NPM Package is Develop for ReactJS Frontend Developers to make development easy.
44
- The one Command make the all Login Sign Up interfaces
5+
- Latest Version (v5.0.0 27 July -2024)
6+
7+
- Updates of `v5.0.0 27 July -2024`
8+
9+
- - developer no need to copy and past commands
10+
- - only run following command after install this package and other packages
11+
12+
13+
``` js
14+
15+
npx create-login-SignUp
16+
17+
```
18+
19+
- - you must install
20+
21+
- - - react-router-dom
22+
- - - axios
23+
- - - react-icons
24+
25+
- - before run the app
526

627
# Releases
728

@@ -47,6 +68,24 @@
4768
- - with Database
4869
- - now working with Mysql witout MVC and With MVC
4970

71+
## v5.0.0 - 27 July 2024
72+
73+
- Updating Package
74+
- 5th Major Release
75+
- same as v4.0.0
76+
- Updating is
77+
- - developer no need to copy the commands in here to genarate backend and Front end
78+
- - only thing is run the following command
79+
80+
``` js
81+
82+
npx create-login-SignUp
83+
84+
```
85+
86+
- - Then Select the option that you need
87+
88+
5089
# IMPORTANT Notice
5190

5291
- This NPM package works with <b>ReactJS</b> Projects (from in v2.0.0)

index.js

Lines changed: 56 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
#!/usr/bin/env node
2+
13
const fs = require('fs-extra');
24
const path = require('path');
35
const argv = require('yargs').argv;
6+
const inquirer = require('inquirer');
47

58
const source = argv.source || path.join(__dirname, 'LoginSignUp');
69
const destination = argv.destination || path.join(process.cwd(), 'src/components/LoginSignUp');
@@ -70,10 +73,57 @@ async function RunBackendMysqlMVC() {
7073
}
7174
}
7275

76+
async function main() {
77+
try {
78+
// Prompt the user to select an option from the list
79+
const answers = await inquirer.prompt([
80+
{
81+
type: 'list',
82+
name: 'selection1',
83+
message: 'Select Your Front End :',
84+
choices: ['Uing TailWindCSS', 'Using Custom CSS'],
85+
},
86+
{
87+
type: 'list',
88+
name: 'selection2',
89+
message: 'Select Your BackEnd End :',
90+
choices: ['Using MySQL without MVC', 'Using MySQL with MVC'],
91+
}
92+
]);
93+
94+
const { selection1, selection2 } = answers;
95+
96+
switch (selection1) {
97+
case 'Uing TailWindCSS':
98+
await RunReactLoginSignInTW();
99+
break;
100+
101+
case 'Using Custom CSS':
102+
await RunReactLoginSignIn();
103+
break;
104+
105+
default:
106+
console.log('Invalid selection.');
107+
}
108+
109+
switch (selection2) {
110+
case 'Using MySQL without MVC':
111+
await RunBackendMysqlNoMVC();
112+
break;
113+
114+
case 'Using MySQL with MVC':
115+
await RunBackendMysqlMVC();
116+
break;
117+
118+
default:
119+
console.log('Invalid selection.');
120+
}
121+
} catch (error) {
122+
console.error(`An error occurred: ${error.message}`);
123+
}
124+
}
125+
126+
main();
127+
128+
73129

74-
module.exports = {
75-
RunReactLoginSignIn,
76-
RunReactLoginSignInTW,
77-
RunBackendMysqlNoMVC,
78-
RunBackendMysqlMVC
79-
}

0 commit comments

Comments
 (0)