diff --git a/CLI-Tools-MERN-Stack-beginners/.gitignore b/CLI-Tools-MERN-Stack-beginners/.gitignore
new file mode 100644
index 00000000..4441e834
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/.gitignore
@@ -0,0 +1,60 @@
+node_modules
+.DS_Store
+.dart_tool/
+.packages
+build/
+pubspec.lock
+
+doc/api/
+
+.env*
+
+*.dart.js
+*.info.json # Produced by the --dump-info flag.
+*.js # When generated by dart2js. Don't specify *.js if your
+ # project includes source files written in JavaScript.
+*.js_
+*.js.deps
+*.js.map
+
+.flutter-plugins
+.flutter-plugins-dependencies
+
+.pnp.*
+.yarn/*
+!.yarn/patches
+!.yarn/plugins
+!.yarn/releases
+!.yarn/sdks
+!.yarn/versions
+
+.yarn/*
+!.yarn/cache
+!.yarn/patches
+!.yarn/plugins
+!.yarn/releases
+!.yarn/sdks
+!.yarn/versions
+
+*.class
+
+*.log
+
+*.ctxt
+
+.mtj.tmp/
+
+*.jar
+*.war
+*.nar
+*.ear
+*.zip
+*.tar.gz
+*.rar
+
+hs_err_pid*
+replay_pid*
+
+/coverage
+/build
+npm-debug.log*
\ No newline at end of file
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-react/.gitignore b/CLI-Tools-MERN-Stack-beginners/configure-react/.gitignore
new file mode 100644
index 00000000..aba180c0
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-react/.gitignore
@@ -0,0 +1,10 @@
+node_modules
+DS_Store
+npm-debug.log
+yarn-error.log
+yarn-debug.log
+.env
+.env.local
+.env.development.local
+.env.test
+.env.production.local
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-react/commands/basic-react-app.command.js b/CLI-Tools-MERN-Stack-beginners/configure-react/commands/basic-react-app.command.js
new file mode 100644
index 00000000..787ee83e
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-react/commands/basic-react-app.command.js
@@ -0,0 +1,90 @@
+const shell = require("shelljs");
+const path = require("path");
+const details = require("configure-react/commands/details.json");
+const fs = require("fs");
+// console.log(details.reactApp.appJsData.join("\n"))
+
+const installreactRouter = () => {
+ shell.exec(`npm i react-router-dom`);
+ shell.exec(`npm i react-dom`);
+};
+
+const editRouterJs = () => {
+ routerFileCode = details.reactApp.routerFileCode.join("\n");
+ fs.writeFileSync(
+ path.join(shell.pwd() + "/src/router/RoutesLink.js"),
+ routerFileCode,
+ (err, data) => {}
+ );
+};
+
+const createRouterFolder = () => {
+ shell.exec("mkdir " + path.join(shell.pwd() + "/src/router"));
+ shell.exec("mkdir " + path.join(shell.pwd() + "/src/components"));
+
+ shell.exec("touch " + path.join(shell.pwd() + "/src/router/index.js"));
+ shell.exec("touch " + path.join(shell.pwd() + "/src/router/RoutesLink.js"));
+ editRouterJs();
+};
+
+const editAppJs = () => {
+ appJsData = details.reactApp.appJsFileCode.join("\n");
+
+ shell.exec("rm -rf " + path.join(shell.pwd() + "/src/App.css"));
+ fs.writeFileSync(
+ path.join(shell.pwd() + "/src/App.js"),
+ appJsData,
+ (err, data) => {}
+ );
+ installreactRouter();
+ createRouterFolder();
+ shell.exec("npm run start");
+};
+
+const runBuild = () => {
+ editAppJs();
+};
+
+const editTaiwindConfig = () => {
+ tailwindReactConfigData = details.tailwindReactConfigData.join("\n");
+
+ srcIndexCSSData = details.srcIndexCSSData.join("\n");
+
+ fs.writeFileSync(
+ path.join(shell.pwd() + "/tailwind.config.js"),
+ tailwindReactConfigData,
+ (err, data) => {}
+ );
+ fs.writeFileSync(
+ path.join(shell.pwd() + "/src/index.css"),
+ srcIndexCSSData,
+ (err, data) => {}
+ );
+
+ runBuild();
+};
+
+const configureForTailwind = () => {
+ shell.exec("npm install -D tailwindcss postcss autoprefixer");
+ shell.touch("tailwind.config.js");
+
+ editTaiwindConfig();
+};
+
+const createTailwindReactApp = (name) => {
+ const projectExist = require("configure-react/commands/projectExist");
+ if (projectExist(name) == true) {
+ shell.exit();
+ }
+
+ try {
+ shell.exec(`npx create-react-app ${name}`);
+ shell.cd(name);
+ configureForTailwind();
+ } catch (err) {
+ console.log(err.message);
+ shell.exit();
+ }
+};
+
+module.exports = createTailwindReactApp;
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-react/commands/basic-react-app/basic-react-app.command.js b/CLI-Tools-MERN-Stack-beginners/configure-react/commands/basic-react-app/basic-react-app.command.js
new file mode 100644
index 00000000..a1f241c6
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-react/commands/basic-react-app/basic-react-app.command.js
@@ -0,0 +1,63 @@
+const shell = require("shelljs");
+const path = require("path");
+const fs = require("fs");
+const wrapTagAround = require("configure-react/utils/wrapTagAround");
+const importAtTop = require("configure-react/utils/importAtTop");
+
+const settingReactRouter = () => {
+ // Create Routes
+ shell.exec("npx configure-react create-routes");
+};
+
+const settingRedux = () => {
+ // Create Redux
+ shell.exec("npx configure-react create-redux");
+};
+
+const settingFormik = () => {
+ // Create Formik
+};
+
+const settingAxios = () => {
+ // Create Axios
+
+
+
+
+};
+
+const startCreateReactApp = () => {
+ shell.exec(
+ "npm i react-router-dom react-router redux react-redux redux-thunk formik yup axios react-toastify react-icons "
+ );
+ settingReactRouter();
+ settingRedux();
+ settingFormik();
+ settingYup();
+ settingAxios();
+ settingReactToastify();
+ settingReactIcons();
+};
+
+const basicReactApp = (projectName) => {
+ if (projectName[0] !== ".")
+ return console.log(
+ "Please go to the project directory root where package.json and react install and run the command"
+ );
+ const currentPath = process.cwd();
+ const packageJsonPath = path.join(currentPath, "./package.json");
+ const packageJsonData = fs.readFileSync(packageJsonPath, "utf8");
+ const packageJsonDataObject = JSON.parse(packageJsonData);
+ const packageJsonDataObjectScripts = packageJsonDataObject.scripts;
+ if (
+ packageJsonDataObjectScripts["start"] !== "react-scripts start" ||
+ packageJsonData.dependencies.react === undefined
+ ) {
+ return console.log(
+ "Please install react and run the command from the project directory root where package.json and react install"
+ );
+ }
+ startCreateReactApp();
+};
+
+module.exports = basicReactApp;
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-react/commands/basic-react-app/create-routes.js b/CLI-Tools-MERN-Stack-beginners/configure-react/commands/basic-react-app/create-routes.js
new file mode 100644
index 00000000..1ab2cd5c
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-react/commands/basic-react-app/create-routes.js
@@ -0,0 +1,7 @@
+const path = require("path");
+const fs = require("fs");
+const shell = require("shelljs");
+const sameFileExist = require("configure-react/utils/sameFileExist");
+const makeCodePritter = require("configure-react/utils/makeCodePritter");
+const wrapTagAround = require("configure-react/utils/wrapTagAround");
+
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-react/commands/chakraUi.command.js b/CLI-Tools-MERN-Stack-beginners/configure-react/commands/chakraUi.command.js
new file mode 100644
index 00000000..c0d62a3c
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-react/commands/chakraUi.command.js
@@ -0,0 +1,42 @@
+const { wrapTagAround, ifNotDot } = require("configure-react/utils");
+
+const shell = require("shelljs");
+const path = require("path");
+const fs = require("fs");
+
+const editIndexJs = (currentPath) => {
+ const indexJsPath = path.join(currentPath, "./src/index.js");
+ wrapTagAround(
+ "ChakraProvider",
+ indexJsPath,
+ "ChakraProvider",
+ "@chakra-ui/react"
+ );
+};
+
+const editPackageJson = () => {
+ console.log("editPackageJson function called");
+ const currentPath = process.cwd();
+ // const packageJsonPath = path.join(currentPath, "./package.json");
+ // const packageJson = require("./package.json");
+ console.log(currentPath);
+ editIndexJs(currentPath);
+ // editIndexJs();
+};
+const chakraUi = async ([projectName]) => {
+ function run() {
+ ifNotDot(projectName);
+ editPackageJson();
+ }
+ run();
+
+ // ifNotDot(projectName);
+ // editPackageJson();
+};
+
+module.exports = chakraUi;
+
+// Language: javascript
+
+// ======================= Add Provider in index.js ======================= // add provider in index.js file
+// Add the provider in index.js file keeping the other code as it is
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-react/commands/createAxios.command.js b/CLI-Tools-MERN-Stack-beginners/configure-react/commands/createAxios.command.js
new file mode 100644
index 00000000..2807bc72
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-react/commands/createAxios.command.js
@@ -0,0 +1,106 @@
+const shell = require("shelljs");
+const path = require("path");
+const fs = require("fs");
+const wrapTagAround = require("configure-react/utils/wrapTagAround");
+const importAtTop = require("configure-react/utils/importAtTop");
+
+const detail = require("configure-react/commands/details.json");
+
+const {
+ editReadme,
+ createDotEnv,
+ createComponent,
+ checkIfRoot,
+ makeCodePritter,
+ endingScreen,
+} = require("configure-react/utils");
+
+const createAxios = (args) => {
+ if (!checkIfRoot(args)) {
+ return console.log(
+ "You are not in the root of a react app. Please run this command in the root of a react app."
+ );
+ }
+ const currentPath = process.cwd();
+ startCreatingAxios(currentPath);
+ endingScreen();
+};
+
+const startCreatingAxios = (currentPath) => {
+ shell.exec("npm i axios");
+
+ const readmePath = path.join(currentPath, "./README.md");
+ editReadme(readmePath, "axios");
+ shell.mkdir("-p", path.join(currentPath, "./src/api")); // -p flag creates parent directories if they don't exist
+ // create file if not exist
+ const env = path.join(currentPath, "./.env");
+ const componentPath = path.join(currentPath, "./src/components");
+ // if (!fs.existsSync(env)) {
+ createDotEnv(env);
+ createComponent(componentPath);
+ // }
+
+ shell.touch(path.join(currentPath, "./src/api/index.js"));
+ shell.touch(path.join(currentPath, "./src/api/login.js"));
+ shell.touch(path.join(currentPath, "./src/api/register.js"));
+ shell.touch(path.join(currentPath, "./src/api/getData.js"));
+ shell.touch(path.join(currentPath, "./src/api/postData.js"));
+
+ const indexFilePath = path.join(currentPath, "./src/api/index.js");
+ const loginFilePath = path.join(currentPath, "./src/api/login.js");
+ const registerFilePath = path.join(currentPath, "./src/api/register.js");
+ const getDataFilePath = path.join(currentPath, "./src/api/getData.js");
+ const postDataFilePath = path.join(currentPath, "./src/api/postData.js");
+
+ // edit index.js
+ const apiIndex = detail.apiIndexData.join("\n");
+ fs.writeFileSync(indexFilePath, makeCodePritter(apiIndex), "utf8", (err) => {
+ if (err) throw err;
+ });
+
+ // edit login.js
+ const loginApiData = detail.loginApiData.join("\n");
+ fs.writeFileSync(
+ loginFilePath,
+ makeCodePritter(loginApiData),
+ "utf8",
+ (err) => {
+ if (err) throw err;
+ }
+ );
+
+ // edit register.js
+ const registerApiData = detail.registerApiData.join("\n");
+ fs.writeFileSync(
+ registerFilePath,
+ makeCodePritter(registerApiData),
+ "utf8",
+ (err) => {
+ if (err) throw err;
+ }
+ );
+
+ // edit getData.js
+ const getApiData = detail.getApiData.join("\n");
+ fs.writeFileSync(
+ getDataFilePath,
+ makeCodePritter(getApiData),
+ "utf8",
+ (err) => {
+ if (err) throw err;
+ }
+ );
+
+ // edit postData.js
+ const postApiData = detail.postApiData.join("\n");
+ fs.writeFileSync(
+ postDataFilePath,
+ makeCodePritter(postApiData),
+ "utf8",
+ (err) => {
+ if (err) throw err;
+ }
+ );
+};
+
+module.exports = createAxios;
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-react/commands/createClusterApp.command.js b/CLI-Tools-MERN-Stack-beginners/configure-react/commands/createClusterApp.command.js
new file mode 100644
index 00000000..7a67d2c0
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-react/commands/createClusterApp.command.js
@@ -0,0 +1,156 @@
+const fs = require("fs");
+const path = require("path");
+const shell = require("shelljs");
+const { endingScreen, sameFileExists, editReadme } = require("../utils");
+const { gitIgnore, packageJson } = require("../fileData/cluster/other");
+const { manifestJSON } = require("../fileData/cluster/public");
+let { indexHTML, robotsTXT } = require("../fileData/cluster/public");
+const {
+ appCss,
+ appJs,
+ appTest,
+ indexCss,
+ indexJs,
+ reportWebVitals,
+ setupTests,
+ logoSvg,
+ childComponent,
+} = require("../fileData/cluster/src");
+
+const createPublic = (clusterPublicPath) => {
+ // indexHTML = indexHTML.join("\n");
+ // robotsTXT = robotsTXT.join("\n");
+ fs.writeFileSync(clusterPublicPath + "/index.html", indexHTML());
+ fs.writeFileSync(
+ path.join(clusterPublicPath, "manifest.json"),
+ manifestJSON()
+ );
+ fs.writeFileSync(path.join(clusterPublicPath, "robots.txt"), robotsTXT());
+};
+
+const createSrc = (clusterAppSrcPath) => {
+ fs.writeFileSync(path.join(clusterAppSrcPath, "App.css"), appCss());
+ fs.writeFileSync(path.join(clusterAppSrcPath, "App.js"), appJs());
+ fs.writeFileSync(path.join(clusterAppSrcPath, "app.test.js"), appTest());
+ fs.writeFileSync(path.join(clusterAppSrcPath, "index.css"), indexCss());
+ fs.writeFileSync(path.join(clusterAppSrcPath, "index.js"), indexJs());
+ fs.writeFileSync(
+ path.join(clusterAppSrcPath, "reportWebVitals.js"),
+ reportWebVitals()
+ );
+ fs.writeFileSync(path.join(clusterAppSrcPath, "setupTests.js"), setupTests());
+ fs.writeFileSync(path.join(clusterAppSrcPath, "logo.svg"), logoSvg());
+ fs.writeFileSync(
+ path.join(clusterAppSrcPath, "components", "ChildComponent.js"),
+ childComponent()
+ );
+};
+
+const otherFiles = (clusterAppPath, name) => {
+ // createFile(path.join(clusterAppPath, ".gitignore"), gitIgnore);
+
+ fs.writeFileSync(path.join(clusterAppPath, ".gitignore"), gitIgnore());
+ fs.writeFileSync(
+ path.join(clusterAppPath, "package.json"),
+ packageJson(name)
+ );
+ fs.writeFileSync(path.join(clusterAppPath, "README.md"), readmeData());
+};
+
+const startCreating = (name) => {
+ const currentPath = process.cwd(); // get the current path
+ const clusterAppPath = path.join(currentPath, name); // get the cluster app path
+ const clusterAppSrcPath = path.join(clusterAppPath, "src"); // get the cluster app src path
+ const clusterAppSrcComponentsPath = path.join(
+ clusterAppSrcPath,
+ "components"
+ ); // get the cluster app src components path
+ const clusterPublicPath = path.join(clusterAppPath, "public"); // get the cluster app public path
+ shell.mkdir("-p", clusterAppSrcComponentsPath); // create the cluster app src components folder
+ shell.mkdir("-p", clusterPublicPath); // create the cluster app public folder
+ createPublic(clusterPublicPath);
+ createSrc(clusterAppSrcPath);
+ otherFiles(clusterAppPath, name); // create other files #working
+};
+const clusterApp = (name) => {
+ name = name[0].toLowerCase();
+
+ if (sameFileExists(name)) {
+ console.log("Folder already exists");
+ return;
+ }
+ const currentPath = process.cwd();
+
+ const files = fs.readdirSync("./");
+
+ if (!files.includes("package.json")) {
+ console.log(
+ "Please run this command in root folder where you have your cluster app"
+ );
+ return;
+ }
+ const packageJson = require(path.join(currentPath, "./package.json"));
+ const { dependencies, pacakageAuthor } = packageJson;
+ if (!dependencies || !dependencies["react"] || !dependencies["react-dom"]) {
+ console.log("Please install react and react-dom");
+ return;
+ }
+
+ if (!packageJson.name.startsWith("cluster-")) {
+ console.log(
+ "Please run this command in root folder where you have your cluster app"
+ );
+ return;
+ }
+ // console.log(packageJson.name, "package.name");
+ if (!pacakageAuthor) {
+ console.log("Please add author in package.json file");
+ return;
+ }
+ startCreating(name);
+ // editReadme(currentPath, "utils");
+ const readmePath = path.join(currentPath, name, "README.md");
+ editReadme(readmePath, `Cluster App **${name}** `);
+
+ endingScreen();
+ console.log("\x1b[32m", "cd " + name);
+ console.log("\x1b[32m", "npm start");
+};
+
+module.exports = clusterApp;
+
+// Readme.md
+
+function readmeData() {
+ return `
+# Cluster App
+
+This is a cluster app created using [Configure React](http://github.com/shaantanu9/configure-react)
+
+## Available Scripts
+
+In the project directory, you can run:
+
+### \`npm start\`
+
+Runs the app in the development mode.\
+Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
+
+The page will reload if you make edits.\
+You will also see any lint errors in the console.
+
+### \`npm test\`
+
+Launches the test runner in the interactive watch mode.\
+
+See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
+
+### \`npm run build\`
+
+Builds the app for production to the \`build\` folder.\
+
+### \`npm run eject\`
+
+**Note: this is a one-way operation. Once you \`eject\`, you can’t go back!**
+ `;
+}
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-react/commands/createContextApi.command.js b/CLI-Tools-MERN-Stack-beginners/configure-react/commands/createContextApi.command.js
new file mode 100644
index 00000000..82f7f607
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-react/commands/createContextApi.command.js
@@ -0,0 +1,66 @@
+const {
+ ifNotDot,
+ sameFileExists,
+ wrapTagAround,
+ makeCodePritter,
+} = require("configure-react/utils");
+const shell = require("shelljs");
+const path = require("path");
+const fs = require("fs");
+const detail = require("./details.json");
+
+const createContextFiles = () => {
+ const contextAPIData = detail.contextAPIData.join("\n");
+ const currentPath = process.cwd();
+
+ console.log("currentPath from CreateContextFile ", currentPath);
+ // create context folder
+ shell.mkdir("-p", path.join(currentPath, "./src/context")); // -p is for creating parent folder if not exist
+ // shell.mkdir("-p", path.join(currentPath, "./src/context")); // -p is for creating parent folder if not exist
+ const contextPath = path.join(currentPath, "./src/context");
+ // create AppContext.js file
+ shell.touch(path.join(contextPath, "./AppContext.js"));
+ const appContextPath = path.join(contextPath, "./AppContext.js");
+ fs.writeFileSync(
+ appContextPath,
+ makeCodePritter(contextAPIData),
+ "utf8",
+ (err) => {
+ if (err) throw err;
+ }
+ );
+ // create AppContextProvider.js file
+};
+
+const createContextApi = async ([projectName]) => {
+ if (projectName !== ".")
+ return console.log(
+ "Please run this command in the root directory of your project"
+ );
+ const currentPath = process.cwd();
+ // if at current path package.json file exist
+ if (sameFileExists("package.json")) {
+ // read package.json file
+ const packageJson = require(path.join(currentPath, "./package.json"));
+ // if package.json file has dependencies
+ if (packageJson.dependencies && packageJson.dependencies["react"]) {
+ const indexFilePath = path.join(currentPath, "./src/index.js");
+ console.log("indexFilePath", indexFilePath);
+ // function to edit index.js file
+ wrapTagAround(
+ "AppContext",
+ indexFilePath,
+ "AppContext",
+ "./context/AppContext"
+ );
+ // create context folder
+ createContextFiles();
+ } else {
+ console.log("Please run this command after installing react");
+ }
+ } else {
+ console.log("Please run this command after installing react");
+ }
+};
+
+module.exports = createContextApi;
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-react/commands/createReactCluster.command.js b/CLI-Tools-MERN-Stack-beginners/configure-react/commands/createReactCluster.command.js
new file mode 100644
index 00000000..12d3cc19
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-react/commands/createReactCluster.command.js
@@ -0,0 +1,79 @@
+const { editReadme, endingScreen } = require("configure-react/utils");
+const fs = require("fs");
+const path = require("path");
+const shell = require("shelljs");
+
+const startCreatingBigReact = (currentPath, clusterName) => {
+ shell.touch("package.json");
+ fs.writeFileSync(
+ path.join(currentPath, "./package.json"),
+ packageJsonData(clusterName),
+ "utf8",
+ (err) => {}
+ );
+ shell.exec("npm install");
+ // process.chdir(`./${clusterName}`);
+ shell.exec(`cd ${clusterName}
+ npx configure-react cluster-app demo-cluster-app
+ `);
+};
+
+const createBigReact = (args) => {
+ if (args.length !== 1) {
+ return console.log("Please provide a name for your Big react app.");
+ }
+ const currentPathbefore = process.cwd();
+ folderList = fs.readdirSync(currentPathbefore);
+ if (folderList.includes(args[0])) {
+ return console.log("A folder with this name already exists.");
+ }
+ shell.mkdir(args[0]);
+ shell.cd(args[0]);
+ const currentPath = process.cwd();
+
+ startCreatingBigReact(currentPath, args[0]);
+ // editReadme(currentPath, "big-react");
+ endingScreen();
+ console.log("\n\n");
+ console.log("\x1b[32m", "cd " + args[0] + "/demo-cluster-app");
+ console.log("\x1b[32m", "npm start");
+};
+
+module.exports = createBigReact;
+
+function packageJsonData(clusterName) {
+ return ` {
+ "name": "cluster-${clusterName}",
+ "version": "1.0.0",
+ "description": "React Cluster by configure React ",
+ "dependencies": {
+ "@testing-library/jest-dom": "^5.16.5",
+ "@testing-library/react": "^13.4.0",
+ "@testing-library/user-event": "^13.5.0",
+ "axios": "^1.1.2",
+ "react": "^18.2.0",
+ "react-dom": "^18.2.0",
+ "react-scripts": "5.0.1",
+ "web-vitals": "^2.1.4"
+ },
+ "keywords": [
+ "react",
+ "reactcluster",
+ "react-cluster",
+ "configure-react",
+ "react-configure-cluster"
+ ],
+ "pacakageAuthor": {
+ "name": "Shantanu Bombatkar",
+ "email": "shantanubombatkar2@gmail.com",
+ "url": "https://shantanubombatkar.shodkk.com/",
+ "github": "https://github.com/shaantanu9",
+ "linkedin": "https://www.linkedin.com/in/shantanu-bombatkar"
+ },
+ "license": "MIT",
+ "bugs": {
+ "url": "git+https://github.com/shaantanu9/configure-react/issues"
+ }
+ }
+ `;
+}
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-react/commands/createRoutes.command.js b/CLI-Tools-MERN-Stack-beginners/configure-react/commands/createRoutes.command.js
new file mode 100644
index 00000000..804a5a53
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-react/commands/createRoutes.command.js
@@ -0,0 +1,74 @@
+const path = require("path");
+const fs = require("fs");
+const shell = require("shelljs");
+const {
+ wrapTagAround,
+ makeCodePritter,
+ sameFileExists,
+ editReadme,
+ endingScreen,
+} = require("configure-react/utils");
+
+const detail = require("./details.json");
+
+const createRoutes = (args) => {
+ const currentPath = process.cwd();
+ const routesData = detail.routesData.join("\n");
+ const importRoutesLink = detail.importRoutesLink;
+ shell.exec("npm i react-router-dom react-router");
+ shell.mkdir("-p", path.join(currentPath, "./src/routes"));
+ const routesPath = path.join(currentPath, "./src/routes/RoutesLink.js");
+
+ // import RoutesLink in App.js
+ const appJsPath = path.join(currentPath, "./src/App.js");
+ if (!sameFileExists(appJsPath)) {
+ const appJsData = fs.readFileSync(appJsPath, "utf8");
+ const appJsDataArray = appJsData.split("\n");
+ const importRoutesLinkIndex = appJsDataArray.findIndex((line) =>
+ line.includes("import RoutesLink")
+ );
+ console.log("importRoutesLinkIndex", importRoutesLinkIndex);
+ if (importRoutesLinkIndex === -1) {
+ appJsDataArray.splice(1, 0, importRoutesLink[0]);
+ fs.writeFileSync(appJsPath, appJsDataArray.join("\n"), "utf8", (err) => {
+ if (err) throw err;
+ });
+ }
+ }
+
+ // in App.js use RoutesLink component
+ const appJsData = fs.readFileSync(appJsPath, "utf8");
+ const appJsDataArray = appJsData.split("\n");
+ const useRoutesLinkIndex = appJsDataArray.findIndex((line) =>
+ line.includes("return")
+ );
+ const routePresent =
+ appJsDataArray[useRoutesLinkIndex + 2].includes("");
+ console.log("useRoutesLinkIndex", useRoutesLinkIndex);
+ if (useRoutesLinkIndex !== -1 && !routePresent) {
+ appJsDataArray.splice(useRoutesLinkIndex + 2, 0, " ");
+ fs.writeFileSync(
+ appJsPath,
+ makeCodePritter(appJsDataArray.join("\n")),
+ "utf8",
+ (err) => {
+ if (err) throw err;
+ }
+ );
+ }
+
+ fs.writeFileSync(routesPath, makeCodePritter(routesData), "utf8", (err) => {
+ if (err) throw err;
+ });
+
+ const indexFilePath = path.join(currentPath, "./src/index.js");
+ wrapTagAround(
+ "BrowserRouter",
+ indexFilePath,
+ "{BrowserRouter}",
+ "react-router-dom"
+ );
+ editReadme(currentPath, "routes");
+ endingScreen("routes");
+};
+module.exports = createRoutes;
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-react/commands/createUtils.command.js b/CLI-Tools-MERN-Stack-beginners/configure-react/commands/createUtils.command.js
new file mode 100644
index 00000000..2667a417
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-react/commands/createUtils.command.js
@@ -0,0 +1,68 @@
+const shell = require("shelljs");
+const path = require("path");
+const fs = require("fs");
+const wrapTagAround = require("configure-react/utils/wrapTagAround");
+const importAtTop = require("configure-react/utils/importAtTop");
+const checkIfRoot = require("configure-react/utils/checkIfRoot");
+const detail = require("configure-react/commands/details.json");
+const makeCodePritter = require("configure-react/utils/makeCodePritter");
+
+const {
+ makeCodePritter,
+ checkIfRoot,
+ endingScreen,
+ editReadme,
+} = require("configure-react/utils");
+
+const startCreatingUtils = (currentPath) => {
+ shell.mkdir("-p", path.join(currentPath, "./src/utils"));
+ shell.touch(path.join(currentPath, "./src/utils/index.js"));
+ shell.touch(path.join(currentPath, "./src/utils/localStorage.js"));
+
+ const indexFilePath = path.join(currentPath, "./src/utils/index.js");
+ const localStorageFilePath = path.join(
+ currentPath,
+ "./src/utils/localStorage.js"
+ );
+
+ // edit index.js
+ const utilsIndexFileData = detail.utilsIndexFileData.join("\n");
+ fs.writeFileSync(
+ indexFilePath,
+ makeCodePritter(utilsIndexFileData),
+ "utf8",
+ (err) => {
+ if (err) throw err;
+ }
+ );
+
+ // edit localStorage.js
+ const localStorageFileData = detail.localStorageFileData.join("\n");
+ fs.writeFileSync(
+ localStorageFilePath,
+ makeCodePritter(localStorageFileData),
+ "utf8",
+ (err) => {
+ if (err) throw err;
+ }
+ );
+ return;
+};
+
+const createUtils = (args) => {
+ if (checkIfRoot(args)) {
+ return console.log(
+ "You are not in the root of a react app. Please run this command in the root of a react app."
+ );
+ }
+ const currentPath = process.cwd();
+ startCreatingUtils(currentPath);
+ editReadme(currentPath, "utils");
+ endingScreen();
+};
+
+module.exports = createUtils;
+// React utils folder contains index.js file which exports all the utils functions and files in the utils folder.
+// list of utils folder in react app is as follows:
+// 1. index.js
+// 2. loclasStorage.js // this file contains functions to set, get and remove data from localStorage
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-react/commands/details.json b/CLI-Tools-MERN-Stack-beginners/configure-react/commands/details.json
new file mode 100644
index 00000000..c85e28e0
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-react/commands/details.json
@@ -0,0 +1,442 @@
+{
+ "reactApp": {
+ "tailwindAppJsFileCode": [
+ "",
+ "function App() {",
+ " return (",
+ "
",
+ "
",
+ " Hello world!",
+ "
",
+ " ",
+ " );",
+ "}",
+ "",
+ "export default App;"
+ ],
+ "indexFileCode": [
+ "import React from 'react';",
+ "import { createRoot } from 'react-dom/client';",
+ "import { Provider } from 'react-redux';",
+ "import { store } from './app/store';",
+ "import App from './App';",
+ "import reportWebVitals from './reportWebVitals';",
+ "import './index.css';",
+ "import { BrowserRouter} from 'react-router-dom';",
+ "",
+ "const container = document.getElementById('root');",
+ "const root = createRoot(container);",
+ "",
+ "root.render(",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ ");",
+ "",
+ "// If you want to start measuring performance in your app, pass a function",
+ "// to log results (for example: reportWebVitals(console.log))",
+ "// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals",
+ "reportWebVitals();",
+ ""
+ ],
+ "routerFileCode": [
+ "// eslint-disable-next-line",
+ "import { Route, Routes, BrowserRouter, Switch, Navigate } from 'react-router-dom';",
+ "import React from 'react';",
+ "// import LoginUser from '../components/LoginUser' //importing the LoginUser component",
+ "",
+ "//import {useState, useEffect,useRef} from 'react'",
+ "//import Routes from './components/Routes' //importing the Routes component",
+ "const RoutesLink = (props)=>{",
+ "",
+ " // get token from localstorage",
+ " ",
+ " // if token present return true",
+ " // if admin present return true",
+ " // console.log(isAdmin, 'isAuthenticated');",
+ "",
+ "",
+ "return(",
+ "<>",
+ " ",
+ " {/* : } /> */}",
+ " {/* :}/> */}",
+ " {/* } /> */}",
+ " {/* } /> */}",
+ "",
+ "",
+ ">",
+ "",
+ ")",
+ "}",
+ "",
+ "export default RoutesLink;"
+ ]
+ },
+ "tailwindReactConfigData": [
+ " module.exports = {",
+ " content: [",
+ " './src/**/*.{js,jsx,ts,tsx}',",
+ " ],",
+ " theme: {",
+ " extend: {},",
+ " },",
+ " plugins: [],",
+ " }"
+ ],
+ "tailwindNextConfigData": [
+ " module.exports = {",
+ " content: [",
+ " './pages/**/*.{js,ts,jsx,tsx}',",
+ " './components/**/*.{js,ts,jsx,tsx}',",
+ " ],",
+ "",
+ " theme: {",
+ " extend: {},",
+ " },",
+ " plugins: [],",
+ " }"
+ ],
+ "srcIndexCSSData": [
+ "@tailwind base; @tailwind components; @tailwind utilities"
+ ],
+ "NextIndexData": [
+ "export default function Home() {",
+ " return (",
+ " ",
+ " Hello world!",
+ "
",
+ " )",
+ "}"
+ ],
+ "NextAppData": [
+ "import '../styles/globals.css'",
+ "",
+ "function MyApp({ Component, pageProps }) {",
+ " return ",
+ "}",
+ "",
+ "export default MyApp"
+ ],
+ "NextHeadData": [
+ "import Head from 'next/head'",
+ "",
+ "export default function Meta() {",
+ " return (",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " Next.js + Tailwind CSS",
+ " ",
+ " )",
+ "}"
+ ],
+ "storeIndex": [
+ "import {createStore} from 'redux'",
+ "import rootReducer from '../reducers'",
+ "import thunk from 'redux-thunk'",
+ "import {applyMiddleware, compose} from 'redux'",
+ "",
+ "const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;",
+ "const store = createStore(rootReducer, composeEnhancers(applyMiddleware(thunk)));",
+ "export default store"
+ ],
+ "actionsTypesIndex": ["export const INCREMENT = 'INCREMENT'"],
+ "actionsCreatorsIndex": [
+ "import {INCREMENT} from '../types'",
+ "",
+ "export const addCounter = (increamentCount) => {",
+ " return {",
+ " type: INCREMENT,",
+ " payload: 1,",
+ " }",
+ "}"
+ ],
+
+ "reduxReducersIndex": [
+ "import { combineReducers } from 'redux'",
+ "",
+ "const rootReducer = combineReducers({",
+ " //reducer",
+ "})",
+ "",
+ "export default rootReducer"
+ ],
+ "contextApiData": [
+ "import React, { createContext, useContext, useReducer } from 'react'",
+ "",
+ "export const StateContext = createContext()",
+ "",
+ "export const StateProvider = ({children,store }) => {",
+ "const {dispatch, getState} = store",
+ " const value={dispatch,state:getState()}",
+ " return (",
+ " ",
+ " {children}",
+ " ",
+ " )",
+ "}",
+ "",
+ "export const useStateValue = () => useContext(StateContext)"
+ ],
+ "callingContextApi": [
+ "import React from 'react'",
+ "import {useStateValue} from './StateProvider'",
+ "",
+ "function App() {",
+ " const { dispatch, state } = useStateValue()",
+ " return (",
+ " ",
+ "
Hello World
",
+ " ",
+ " )",
+ "}",
+ "",
+ "export default App"
+ ],
+ "contextAPIData": [
+ "import React, { createContext, useContext, useReducer } from 'react'",
+ "",
+ "export const StateContext = createContext()",
+ "",
+ "export const StateProvider = ({children,store }) => {",
+ "const {dispatch, getState} = store",
+ " const value={dispatch,state:getState()}",
+ " return (",
+ " ",
+ " {children}",
+ " ",
+ " )",
+ "}",
+ "",
+ "export const useStateValue = () => useContext(StateContext)"
+ ],
+ "routesData": [
+ "import { Route, Routes, Switch, Navigate } from 'react-router-dom';",
+ "import { useState, useEffect, useRef } from 'react';",
+ "import { useSelector, useDispatch } from 'react-redux';",
+ "import { getAdmin, getUser } from '../redux/actions/authActions';",
+ "import { getAdminSelector, getUserSelector } from '../redux/selectors/authSelector';",
+ "import { getAdmin as getAdminFromLocalStorage, getUser as getUserFromLocalStorage } from '../utils/localStorage';",
+ "",
+ "import Login from '../pages/LoginUser';",
+ "import UserDashboard from '../pages/UserDashboard';",
+ "import Admin from '../pages/Admin';",
+ "import GetSpecificUserDetail from '../pages/GetSpecificUserDetail';",
+ "",
+ "const RoutesLink = () => {",
+ " const dispatch = useDispatch();",
+ " const admin = useSelector(getAdminSelector);",
+ " const user = useSelector(getUserSelector);",
+ " const [isUserLoggedIn, setIsUserLoggedIn] = useState(false);",
+ " const [isAdminLoggedIn, setIsAdminLoggedIn] = useState(false);",
+ " const [isUserLoading, setIsUserLoading] = useState(true);",
+ " const [isAdminLoading, setIsAdminLoading] = useState(true);",
+ " const [isUserError, setIsUserError] = useState(false);",
+ " const [isAdminError, setIsAdminError] = useState(false);",
+ "",
+ " const isMounted = useRef(true);",
+ "",
+ " useEffect(() => {",
+ " const user = getUserFromLocalStorage();",
+ " const admin = getAdminFromLocalStorage();",
+ " if (user) {",
+ " dispatch(getUser(user));",
+ " }",
+ " if (admin) {",
+ " dispatch(getAdmin(admin));",
+ " }",
+ " setIsUserLoading(false);",
+ " setIsAdminLoading(false);",
+ " return () => {",
+ " isMounted.current = false;",
+ " };",
+ " }, []);",
+ "",
+ " useEffect(() => {",
+ " if (isMounted.current) {",
+ " if (user) {",
+ " setIsUserLoggedIn(true);",
+ " } else {",
+ " setIsUserLoggedIn(false);",
+ " }",
+ " if (admin) {",
+ " setIsAdminLoggedIn(true);",
+ " } else {",
+ " setIsAdminLoggedIn(false);",
+ " }",
+ " }",
+ " }, [user, admin]);",
+ "",
+ " return (",
+ " ",
+ " }>",
+ " >}>",
+ " }>",
+ " ",
+ " );",
+ "};",
+ "",
+ "const PrivateRoutes = () => {",
+ " const { user, admin } = useSelector((state) => state.auth);",
+ " return (",
+ " ",
+ " }>",
+ " }>",
+ " }>",
+ " }>",
+ " ",
+ " );",
+ "};",
+ "",
+ "export default RoutesLink;"
+ ],
+ "importRoutesLink": [
+ "import RoutesLink from './routes/RoutesLink';",
+ ""
+ ],
+ "apiIndexData": [
+ "import login from './login';",
+ "import register from './register';",
+ "import getData from './getData';",
+ "",
+ "export {",
+ " login,",
+ "register,",
+ "getData",
+ "};"
+ ],
+ "loginApiData": [
+ "import axios from 'axios';",
+ "const BASE_URL = process.env.REACT_APP_BASE_URL;",
+ "",
+ "const login = async (data) => {",
+ " try {",
+ " const response = await axios.post(`${BASE_URL}/login`, data);",
+ " return response.data;",
+ " } catch (error) {",
+ " return error.response.data;",
+ " }",
+ "};",
+ "",
+ "export default login;"
+ ],
+ "registerApiData": [
+ "import axios from 'axios';",
+ "const BASE_URL = process.env.REACT_APP_BASE_URL;",
+ "",
+ "const register = async (data) => {",
+ " try {",
+ " const response = await axios.post(`${BASE_URL}/register`, data);",
+ " return response.data;",
+ " } catch (error) {",
+ " return error.response.data;",
+ " }",
+ "};",
+ "",
+ "export default register;"
+ ],
+ "getApiData": [
+ "import axios from 'axios';",
+ "const BASE_URL = process.env.REACT_APP_BASE_URL;",
+ "",
+ "const getData = async (token) => {",
+ " try {",
+ " const response = await axios.get(`${BASE_URL}/getData`, {",
+ " headers: {",
+ " Authorization: `Bearer ${token}`",
+ " }",
+ " });",
+ " return response.data;",
+ " } catch (error) {",
+ " return error.response.data;",
+ " }",
+ "};",
+ "",
+ "export default getData;"
+ ],
+ "postApiData": [
+ "import axios from 'axios';",
+ "const BASE_URL = process.env.REACT_APP_BASE_URL;",
+ "",
+ "const postData = async (data, token) => {",
+ " try {",
+ " const response = await axios.post(`${BASE_URL}/postData`, data, {",
+ " headers: {",
+ " Authorization: `Bearer ${token}`",
+ " }",
+ " });",
+ " return response.data;",
+ " } catch (error) {",
+ " return error.response.data;",
+ " }",
+ "};",
+ "",
+ "export default postData;"
+ ],
+ "utilsIndexFileData": [
+ "import { BASE_URL } from './constants';",
+ "import { getUserFromLocalStorage,setTokenInLocalStorage,setUserInLocalStorage } from './localStorage';",
+ "",
+ "export { BASE_URL, getUserFromLocalStorage, setUserInLocalStorage, setTokenInLocalStorage };"
+ ],
+ "constantsFileData": [
+ "export const BASE_URL = process.env.REACT_APP_BASE_URL;"
+ ],
+ "localStorageFileData": [
+ "export const getUserFromLocalStorage = () => {",
+ " const user = localStorage.getItem('user');",
+ " if (user) {",
+ " return JSON.parse(user);",
+ " }",
+ " return null;",
+ "};",
+ "",
+ "export const getTokenFromLocalStorage = () => {",
+ " const token = localStorage.getItem('token');",
+ " if (token) {",
+ " return JSON.parse(token);",
+ " }",
+ " return null;",
+ "};",
+ "",
+ "export const setUserInLocalStorage = (user) => {",
+ " localStorage.setItem('user', JSON.stringify(user));",
+ "};",
+ "",
+ "export const setTokenInLocalStorage = (token) => {",
+ " localStorage.setItem('token', JSON.stringify(token));",
+ "};",
+ "",
+ "export const removeUserFromLocalStorage = () => {",
+ " localStorage.removeItem('user');",
+ "};",
+ "",
+ "export const removeTokenFromLocalStorage = () => {",
+ " localStorage.removeItem('token');",
+ "};"
+ ],
+ "envData": [
+ "REACT_APP_BASE_URL=http://localhost:5000",
+ "REACT_APP_GOOGLE_CLIENT_ID=1000000000000-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com",
+ "REACT_APP_FACEBOOK_APP_ID=",
+ "REACT_APP_GITHUB_CLIENT_ID=",
+ "REACT_APP_TWITTER_CLIENT_ID=",
+ "REACT_APP_LINKEDIN_CLIENT_ID=",
+ "REACT_APP_INSTAGRAM_CLIENT_ID=",
+ "REACT_APP_API_KEY=",
+ "REACT_APP_AUTH_DOMAIN=",
+ "REACT_APP_DATABASE_URL=",
+ "REACT_APP_PROJECT_ID=",
+ "REACT_APP_STORAGE_BUCKET=",
+ "REACT_APP_MESSAGING_SENDER_ID=",
+ "REACT_APP_APP_ID=",
+ "REACT_APP_MEASUREMENT_ID="
+ ]
+}
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-react/commands/installClusterApp.command.js b/CLI-Tools-MERN-Stack-beginners/configure-react/commands/installClusterApp.command.js
new file mode 100644
index 00000000..b34fe01b
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-react/commands/installClusterApp.command.js
@@ -0,0 +1,61 @@
+const fs = require("fs");
+const path = require("path");
+const shell = require("shelljs");
+const { editReadme, endingScreen } = require("configure-react/utils");
+
+const installClusterApp = (args) => {
+ const packageObject = {};
+ const listOfPackages = args.join(" ");
+ const currentPath = process.cwd();
+ const packageJsonPath = path.join(currentPath, "./package.json");
+ const packageJsonData = fs.readFileSync(packageJsonPath, "utf8");
+ const packageJsonDataObject = JSON.parse(packageJsonData);
+ const clusterName = packageJsonDataObject.name;
+ const clusterapp = packageJsonDataObject.clusterapp;
+ if (clusterapp === undefined) {
+ console.log("No clusterapp found in package.json");
+ return;
+ }
+
+ // ---------------------------------------------------------------------------------------
+
+ process.chdir("../");
+
+ // read cluster from package.json
+ mainClusterPath = path.join(process.cwd());
+ // read clusterapp from package.json
+ const mainClusterPackageJson = fs.readFileSync(
+ path.join(mainClusterPath, "./package.json"),
+ "utf8"
+ );
+ const mainClusterPackageJsonDataObject = JSON.parse(mainClusterPackageJson);
+
+ args.forEach((arg) => {
+ if (mainClusterPackageJsonDataObject.dependencies[arg] === undefined) {
+ shell.exec("npm install " + arg);
+ }
+ });
+
+ args.forEach((arg) => {
+ console.log("Installing " + arg);
+ const mainClusterPackageJson = fs.readFileSync(
+ path.join(mainClusterPath, "./package.json"),
+ "utf8"
+ );
+ const mainClusterPackageJsonDataObject = JSON.parse(mainClusterPackageJson);
+ packageJsonDataObject.dependencies[arg] =
+ mainClusterPackageJsonDataObject.dependencies[arg];
+ });
+
+ fs.writeFileSync(
+ packageJsonPath,
+ JSON.stringify(packageJsonDataObject, null, 2),
+ "utf8",
+ (err) => {}
+ );
+ console.log("Installed clusterapp successfully");
+ // editReadme();
+ endingScreen();
+};
+
+module.exports = installClusterApp;
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-react/commands/next-app.command.js b/CLI-Tools-MERN-Stack-beginners/configure-react/commands/next-app.command.js
new file mode 100644
index 00000000..d27a80ae
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-react/commands/next-app.command.js
@@ -0,0 +1,63 @@
+const shell = require("shelljs");
+const path = require("path");
+const details = require("./details.json");
+// console.log(details.reactApp.appJsData.join("\n"))
+
+const editAppJs = () => {
+ indexJsData = details.NextIndexData.join("\n");
+
+ const fs = require("fs");
+
+ // shell.exec('rm -rf '+path.join(shell.pwd()+'/src/App.css'))
+ fs.writeFileSync(
+ path.join(shell.pwd() + "/pages/index.js"),
+ indexJsData,
+ (err, data) => {}
+ );
+ shell.exec("npm run dev");
+};
+
+const runBuild = () => {
+ editAppJs();
+};
+
+const editTaiwindConfig = () => {
+ const fs = require("fs");
+
+ tailwindNextConfigData = details.tailwindNextConfigData.join("\n");
+
+ srcIndexCSSData = details.srcIndexCSSData.join("\n");
+
+ fs.writeFileSync(
+ path.join(shell.pwd() + "/tailwind.config.js"),
+ tailwindNextConfigData,
+ (err, data) => {}
+ );
+ fs.writeFileSync(
+ path.join(shell.pwd() + "/styles/globals.css"),
+ srcIndexCSSData,
+ (err, data) => {}
+ );
+
+ runBuild();
+};
+
+const configureForTailwind = () => {
+ shell.exec("npm install -D tailwindcss postcss autoprefixer");
+ shell.touch("tailwind.config.js");
+
+ editTaiwindConfig();
+};
+
+const createTailwindNextApp = (name) => {
+ try {
+ shell.exec(`npx create-next-app ${name}`);
+ shell.cd(name);
+ configureForTailwind();
+ } catch (err) {
+ console.log(err.message);
+ shell.exit();
+ }
+};
+
+module.exports = createTailwindNextApp;
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-react/commands/projectExist.js b/CLI-Tools-MERN-Stack-beginners/configure-react/commands/projectExist.js
new file mode 100644
index 00000000..bf89e845
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-react/commands/projectExist.js
@@ -0,0 +1,16 @@
+const fs = require("fs");
+
+projectExist = (path) => {
+ try {
+ if (fs.existsSync(`./${path}`)) {
+ //file exists
+ console.log(" Sorry Same Name File Already Exist, Try Another Name");
+ return true;
+ // shell.exit()
+ }
+ } catch (err) {
+ console.error("err");
+ }
+};
+
+module.exports = projectExist;
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-react/commands/react-redux-app.command.js b/CLI-Tools-MERN-Stack-beginners/configure-react/commands/react-redux-app.command.js
new file mode 100644
index 00000000..d0c11a65
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-react/commands/react-redux-app.command.js
@@ -0,0 +1,102 @@
+const shell = require("shelljs");
+const path = require("path");
+const fs = require("fs");
+const details = require("./details.json");
+
+const installreactRouter = () => {
+ shell.exec(`npm i react-router-dom`);
+ shell.exec(`npm i react-dom`);
+};
+
+const editRouterJs = () => {
+ routerFileCode = details.reactApp.routerFileCode.join("\n");
+ fs.writeFileSync(
+ path.join(shell.pwd() + "/src/router/RoutesLink.js"),
+ routerFileCode,
+ (err, data) => {}
+ );
+};
+
+const createRouterFolder = () => {
+ shell.exec("mkdir " + path.join(shell.pwd() + "/src/router"));
+ shell.exec("mkdir " + path.join(shell.pwd() + "/src/components"));
+
+ shell.exec("touch " + path.join(shell.pwd() + "/src/router/index.js"));
+ shell.exec("touch " + path.join(shell.pwd() + "/src/router/RoutesLink.js"));
+ editRouterJs();
+};
+
+const editindexJs = () => {
+ indexFileCode = details.reactApp.indexFileCode.join("\n");
+
+ shell.exec("rm -rf " + path.join(shell.pwd() + "/src/index.js"));
+
+ shell.exec("touch " + path.join(shell.pwd() + "/src/index.js"));
+ shell.exec("touch " + path.join(shell.pwd() + "/src/index.js"));
+
+ fs.writeFileSync(
+ path.join(shell.pwd() + "/src/index.js"),
+ indexFileCode,
+ (err, data) => {}
+ );
+};
+
+const editAppJs = () => {
+ appJsData = details.reactApp.appJsFileCode.join("\n");
+
+ shell.exec("rm -rf " + path.join(shell.pwd() + "/src/App.css"));
+ editindexJs();
+ fs.writeFileSync(
+ path.join(shell.pwd() + "/src/App.js"),
+ appJsData,
+ (err, data) => {}
+ );
+};
+
+const runBuild = () => {
+ editAppJs();
+};
+
+const editTaiwindConfig = () => {
+ tailwindReactConfigData = details.tailwindReactConfigData.join("\n");
+
+ srcIndexCSSData = details.srcIndexCSSData.join("\n");
+
+ fs.writeFileSync(
+ path.join(shell.pwd() + "/tailwind.config.js"),
+ tailwindReactConfigData,
+ (err, data) => {}
+ );
+ fs.writeFileSync(
+ path.join(shell.pwd() + "/src/index.css"),
+ srcIndexCSSData,
+ (err, data) => {}
+ );
+
+ runBuild();
+};
+
+const configureForTailwind = () => {
+ shell.exec("npm install -D tailwindcss postcss autoprefixer");
+ shell.touch("tailwind.config.js");
+
+ editTaiwindConfig();
+};
+
+const createTailwindReactApp = async (name) => {
+ const projectExist = require("./projectExist");
+ if (projectExist(name) == true) {
+ shell.exit();
+ }
+
+ try {
+ shell.exec(`npx create-react-app ${name} --template redux`);
+ shell.cd(name);
+ configureForTailwind();
+ } catch (err) {
+ console.log(err.message);
+ shell.exit();
+ }
+};
+
+module.exports = createTailwindReactApp;
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-react/commands/redux.command.js b/CLI-Tools-MERN-Stack-beginners/configure-react/commands/redux.command.js
new file mode 100644
index 00000000..244d09dd
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-react/commands/redux.command.js
@@ -0,0 +1,236 @@
+const path = require("path"); // path is use to join the path
+const fs = require("fs"); // fs is use to create file and folder
+const shell = require("shelljs"); // shelljs is use to run command in terminal
+const codeSnippets = require("configure-react/commands/details.json");
+const { endingScreen, makeCodePritter } = require("configure-react/utils");
+
+// ======================= Editing All index files ======================= //
+// Edit all index files
+const editIndexFiles = () => {
+ // Edit all index files
+ const currentPath = process.cwd(); // get the current path
+ const indexFilePath = path.join(currentPath, "src/redux/store/index.js"); // get the index file path
+
+ const actionsTypesIndexFilePath = path.join(
+ currentPath,
+ "src/redux/actions/types/index.js"
+ ); // get the actions types index file path
+ const actionsCreatorsIndexFilePath = path.join(
+ currentPath,
+ "src/redux/actions/creators/index.js"
+ ); // get the actions creators index file path
+ const reducersIndexFilePath = path.join(
+ currentPath,
+ "src/redux/reducers/index.js"
+ ); // get the reducers index file path
+
+ // Edit index.js
+ const storeIndex = codeSnippets.storeIndex.join("\n"); // get the store index code
+ fs.writeFileSync(
+ indexFilePath,
+ makeCodePritter(storeIndex),
+ "utf8",
+ (err) => {
+ // write the store index code in index.js file
+ if (err) throw err;
+ }
+ );
+
+ // Edit actions types index.js
+ const actionsTypesIndex = codeSnippets.actionsTypesIndex.join("\n"); // get the actions types index code
+ fs.writeFileSync(
+ actionsTypesIndexFilePath,
+ makeCodePritter(actionsTypesIndex),
+ "utf8",
+ (err) => {
+ // write the actions types index code in actions types index.js file
+ if (err) throw err;
+ }
+ );
+
+ // Edit actions creators index.js
+ const actionsCreatorsIndex = codeSnippets.actionsCreatorsIndex.join("\n"); // get the actions creators index code
+ fs.writeFileSync(
+ actionsCreatorsIndexFilePath,
+ makeCodePritter(actionsCreatorsIndex),
+ "utf8",
+ (err) => {
+ // write the actions creators index code in actions creators index.js file
+ if (err) throw err;
+ }
+ );
+
+ // Edit reducers index.js
+ const reduxReducersIndex = codeSnippets.reduxReducersIndex.join("\n"); // get the reducers index code
+ fs.writeFileSync(
+ reducersIndexFilePath,
+ makeCodePritter(reduxReducersIndex),
+ "utf8",
+ (err) => {
+ // write the reducers index code in reducers index.js file
+ if (err) throw err;
+ }
+ );
+};
+
+// ======================= Install Redux Packages ======================= //
+// install redux and react-redux package using npm if not installed
+const installRedux = () => {
+ // install redux and react-redux using shelljs command
+ installPackage(
+ "redux",
+ "react-redux",
+ "redux-thunk",
+ "redux-devtools-extension"
+ );
+};
+
+// ======================= Create Redux Folder ======================= //
+// Create Redux Folder if not exist in src folder of the project folder
+const createReduxFolder = () => {
+ // Create Redux Folder use to create redux folder
+ const currentPath = process.cwd();
+ createFolders(
+ path.join(currentPath, "src/redux"),
+ path.join(currentPath, "src/redux/actions"),
+ path.join(currentPath, "src/redux/actions/types"),
+ path.join(currentPath, "src/redux/actions/creators"),
+ path.join(currentPath, "src/redux/reducers"),
+ path.join(currentPath, "src/redux/store")
+ );
+};
+
+// ======================= Create Redux File in Redux Folder ======================= //
+// Create Redux Files if not exist in redux folder of the project folder
+const createReduxFiles = () => {
+ // Create Redux Files like actions, reducers, store
+ const currentPath = process.cwd(); // get the current path
+ createFiles(
+ path.join(currentPath, "src/redux/actions/types/index.js"),
+ path.join(currentPath, "src/redux/actions/creators/index.js"),
+ path.join(currentPath, "src/redux/reducers/index.js"),
+ path.join(currentPath, "src/redux/store/index.js")
+ );
+ editIndexFiles();
+};
+
+// ======================= CreateRedux ======================= //
+const createRedux = () => {
+ createReduxFolder(); // create redux folder
+ createReduxFiles(); // create redux files
+ installRedux(); // install redux and react-redux
+ // createReduxContextApi(); // create context api
+ addProvider(); // add provider in index.js file
+ endingScreen();
+};
+
+// ======================= Export ======================= //
+// export the function so that it can be used in other file
+module.exports = createRedux;
+
+// ======================= End ======================= //
+
+// ======================= Create Multiple Folder ======================= // Create multiple Folder if not exist // using rest operator
+
+// Create multiple Folder if not exist // using rest operator
+const createFolders = (...filePath) => {
+ filePath.forEach((path) => {
+ if (!fs.existsSync(path)) {
+ fs.mkdirSync(path);
+ }
+ });
+};
+
+// ======================= Create Multiple File ======================= // Create multiple File if not exist // using rest operator
+// Create multiple Folder if not exist // using rest operator
+const createFiles = (...filePath) => {
+ filePath.forEach((path) => {
+ if (!fs.existsSync(path)) {
+ fs.writeFileSync(path, "");
+ }
+ });
+};
+
+// // ======================= Create Context API for ======================= // install multiple package using shelljs command
+// // to update the state everywhere need to use context api so create context api
+// const createReduxContext = () => {
+// const currentPath = process.cwd();
+// createFolders(path.join(currentPath, "src/context"));
+// createFiles(path.join(currentPath, "src/context/index.js"));
+// };
+
+// // ======================= Create Redux Context File ======================= // create redux context file and add the code in it
+// const createReduxContextFile = () => {
+// const currentPath = process.cwd();
+// const contextApiData = codeSnippets.contextApiData.join("\n"); // join the code snippets with new line
+// // console.log("Adding Context Api", contextApiData);
+// fs.writeFileSync(
+// path.join(currentPath, "src/context/index.js"),
+// contextApiData
+// );
+// };
+
+// // ======================= Create Redux Context Api ======================= // create redux context api Folder and file
+// const createReduxContextApi = () => {
+// createReduxContext();
+// createReduxContextFile();
+// };
+
+// ======================= Add Provider in index.js ======================= // add provider in index.js file
+// Add the provider in index.js file keeping the other code as it is
+const addProvider = () => {
+ const currentPath = process.cwd();
+ // read the index.js file
+ const indexFile = fs.readFileSync(
+ path.join(currentPath, "src/index.js"),
+ "utf-8"
+ );
+
+ // split the file into array
+ const indexFileArray = indexFile.split("\n");
+ // if provider is not present then add the provider
+ if (!indexFileArray.includes("import { Provider } from 'react-redux';")) {
+ // console.log("Adding Provider");
+ indexFileArray.splice(1, 0, "import { Provider } from 'react-redux';"); // add the provider in index.js file at 1st index
+ }
+ // find the index of the line where we need to add the code
+ const index = indexFileArray.findIndex((line) => {
+ line = line.trim().replace(" ", "");
+ return line.includes("");
+ });
+ // add the code in the index.js file if not present
+ if (!indexFileArray.includes(""))
+ // if provider is not present then add the provider
+ indexFileArray.splice(index, 0, ``);
+ if (!indexFileArray.includes(""))
+ // if provider is not present then add the provider
+ indexFileArray.splice(index + 2, 0, ``);
+
+ fs.writeFileSync(
+ path.join(currentPath, "src/index.js"),
+ indexFileArray.join("\n")
+ ); // join the array with new line and write the file
+};
+
+// ======================= Check if Package is Installed ======================= // check if package is installed or not
+// See if package is installed or not
+const isPackageInstalled = (...packageName) => {
+ const currentPath = process.cwd();
+ const packageJson = fs.readFileSync(
+ path.join(currentPath, "package.json"),
+ "utf-8"
+ );
+ const packageJsonData = JSON.parse(packageJson);
+ return packageJsonData.dependencies[packageName];
+};
+
+// ======================= Install Package if not present in package.json ======================= // install package if not present in package.json
+// if package is not installed then install the package
+const installPackage = (...packageName) => {
+ const currentPath = process.cwd();
+ packageName.forEach((package) => {
+ if (!isPackageInstalled(package)) {
+ shell.exec(`npm i ${package}`); // install the package using shelljs
+ }
+ });
+};
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-react/commands/refresh.command.js b/CLI-Tools-MERN-Stack-beginners/configure-react/commands/refresh.command.js
new file mode 100644
index 00000000..e207ce79
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-react/commands/refresh.command.js
@@ -0,0 +1,112 @@
+const fs = require("fs");
+
+const refreshApp = () => {};
+
+const refreshComponents = () => {
+ console.log("refreshComponents function called");
+ let components = fs.readdirSync("./src/components");
+
+ components = components.map((component) => {
+ if (component !== "App.js") {
+ component = component.replace(".js", "");
+ component = component.replace(".jsx", "");
+ component = component.replace(".ts", "");
+ component = component.replace(".tsx", "");
+ }
+ return component;
+ });
+
+ console.log(components, "components Filtered");
+ const componentListNotPresent = [];
+ const alreadyImported = [];
+ console.log(components, "components");
+ !components.includes("index") &&
+ fs.writeFileSync("./src/components/index.js", "");
+ const readContent = fs.readFileSync("./src/components/index.js", "utf8");
+ const content = readContent.split("\n");
+ const lastIndexOfImport = content.lastIndexOf("import ");
+
+ content.map((line) => {
+ if (line.includes("import ")) {
+ line = line.replace("import ", "");
+ const component = line.split(" from ")[0];
+ console.log(component, "component Present");
+ alreadyImported.push(component);
+ }
+ });
+
+ components.map((component) => {
+ if (component !== "index.js") {
+ const componentPresent = alreadyImported.includes(component);
+
+ if (!componentPresent && component !== "index") {
+ const lastIndexOfImportLine = content.lastIndexOf("import ");
+ const present = content.includes("export");
+
+ console.log(present, "present");
+
+ const lastIndexOfExportLine = content.lastIndexOf("export { ");
+ console.log(lastIndexOfImportLine, "lastIndexOfImportLine");
+ const line2Import = `import ${component} from "./${component}";`;
+ const line2Export = `${component}`;
+ content.splice(lastIndexOfImportLine + 1, 0, line2Import);
+ present && content.splice(lastIndexOfExportLine + 1, 0, line2Export);
+ !present &&
+ content.splice(content.length, 0, `export{ ${line2Export} \n }`);
+ console.log(content, "content");
+ }
+ }
+ });
+
+ fs.writeFileSync(
+ "./src/components/index.js",
+ content.join("\n"),
+ (err, data) => {}
+ );
+};
+
+const refreshPages = () => {};
+
+const refreshContext = () => {};
+
+const refreshRedux = () => {};
+
+const refreshUtils = () => {};
+
+const refreshApi = () => {};
+
+const refresh = (name) => {
+ if (name[0] !== ".") {
+ return console.log("Please Go Inside the Project Folder");
+ }
+ // see the folder structure of the project
+ const srcFilesExist = fs.readdirSync("./");
+ if (!srcFilesExist.includes("src")) {
+ return console.log(
+ "Please run this command in the root directory of your project"
+ );
+ }
+ const srcFiles = fs.readdirSync("./src");
+ switch (true) {
+ case srcFiles.includes("app"):
+ refreshApp();
+ case srcFiles.includes("components"):
+ refreshComponents();
+ case srcFiles.includes("pages"):
+ refreshPages();
+ case srcFiles.includes("context"):
+ refreshContext();
+ case srcFiles.includes("redux"):
+ refreshRedux();
+ case srcFiles.includes("utils"):
+ refreshUtils();
+ case srcFiles.includes("api"):
+ refreshApi();
+ default:
+ return console.log(
+ "Please run this command in the root directory of your project"
+ );
+ }
+};
+
+module.exports = refresh;
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-react/commands/tailwind.command.js b/CLI-Tools-MERN-Stack-beginners/configure-react/commands/tailwind.command.js
new file mode 100644
index 00000000..ca93a1b7
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-react/commands/tailwind.command.js
@@ -0,0 +1,64 @@
+const shell = require("shelljs");
+const path = require("path");
+const details = require("./details.json");
+const fs = require("fs");
+const { editReadme, endingScreen } = require("../utils");
+// console.log(details.reactApp.appJsData.join("\n"))
+
+const editAppJs = () => {
+ appJsData = details.reactApp.tailwindAppJsFileCode.join("\n");
+
+ shell.exec("rm -rf " + path.join(shell.pwd() + "/src/App.css"));
+ readMePath = path.join(shell.pwd() + "/README.md");
+
+ editReadme(readMePath, "Tailwind React App");
+ fs.writeFileSync(
+ path.join(shell.pwd() + "/src/App.js"),
+ appJsData,
+ (err, data) => {}
+ );
+};
+
+const runBuild = () => {
+ editAppJs();
+};
+
+const editTaiwindConfig = () => {
+ tailwindReactConfigData = details.tailwindReactConfigData.join("\n");
+
+ srcIndexCSSData = details.srcIndexCSSData.join("\n");
+
+ fs.writeFileSync(
+ path.join(shell.pwd() + "/tailwind.config.js"),
+ tailwindReactConfigData,
+ (err, data) => {}
+ );
+ fs.writeFileSync(
+ path.join(shell.pwd() + "/src/index.css"),
+ srcIndexCSSData,
+ (err, data) => {}
+ );
+
+ runBuild();
+};
+
+const configureForTailwind = () => {
+ shell.exec("npm install -D tailwindcss postcss autoprefixer");
+ shell.touch("tailwind.config.js");
+
+ editTaiwindConfig();
+};
+
+const createTailwindReactApp = (name) => {
+ if (name[0] === ".") {
+ try {
+ configureForTailwind();
+ endingScreen();
+ } catch (err) {
+ console.log(err.message);
+ shell.exit();
+ }
+ }
+};
+
+module.exports = createTailwindReactApp;
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-react/commands/welcome.js b/CLI-Tools-MERN-Stack-beginners/configure-react/commands/welcome.js
new file mode 100644
index 00000000..d481eb19
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-react/commands/welcome.js
@@ -0,0 +1,14 @@
+const welcome = require("@tos_/cli-welcome");
+
+const packageJson = require("../package.json");
+
+// OR with all the options set like this:
+module.exports = welcome({
+ title: `${packageJson.name}`,
+ tagLine: `by ${packageJson.author.name} ${packageJson.author.url}`,
+ bgColor: `#FADC00`,
+ color: `#FFFFFF`,
+ bold: true,
+ clear: true,
+ version: `${packageJson.version}`,
+});
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-react/fileData/cluster/other.js b/CLI-Tools-MERN-Stack-beginners/configure-react/fileData/cluster/other.js
new file mode 100644
index 00000000..05a42b37
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-react/fileData/cluster/other.js
@@ -0,0 +1,72 @@
+const gitIgnore = () => `
+# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
+
+# dependencies
+/node_modules
+/.pnp
+.pnp.js
+
+# testing
+/coverage
+
+# production
+/build
+
+# misc
+.DS_Store
+.env.local
+.env.development.local
+.env.test.local
+.env.production.local
+
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+
+`;
+
+const packageJson = (name) => `{
+ "name": "${name}",
+ "clusterapp": true,
+ "version": "0.1.0",
+ "private": true,
+ "dependencies": {
+ "@testing-library/jest-dom": "^5.16.5",
+ "@testing-library/react": "^13.4.0",
+ "@testing-library/user-event": "^13.5.0",
+ "react": "^18.2.0",
+ "react-dom": "^18.2.0",
+ "react-scripts": "5.0.1",
+ "web-vitals": "^2.1.4"
+ },
+ "scripts": {
+ "start": "react-scripts start",
+ "build": "react-scripts build",
+ "test": "react-scripts test",
+ "eject": "react-scripts eject"
+ },
+ "eslintConfig": {
+ "extends": [
+ "react-app",
+ "react-app/jest"
+ ]
+ },
+ "browserslist": {
+ "production": [
+ ">0.2%",
+ "not dead",
+ "not op_mini all"
+ ],
+ "development": [
+ "last 1 chrome version",
+ "last 1 firefox version",
+ "last 1 safari version"
+ ]
+ }
+ }
+ `;
+
+module.exports = {
+ gitIgnore,
+ packageJson,
+};
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-react/fileData/cluster/public.js b/CLI-Tools-MERN-Stack-beginners/configure-react/fileData/cluster/public.js
new file mode 100644
index 00000000..a5ae0423
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-react/fileData/cluster/public.js
@@ -0,0 +1,60 @@
+const indexHTML = () => `
+
+
+
+
+
+
+
+
+
+ React App Created by configure-react
+
+
+
+
+
+
+`;
+
+const manifestJSON = () => `
+{
+ "short_name": "React App",
+ "name": "Create React App Sample",
+ "icons": [
+ {
+ "src": "favicon.ico",
+ "sizes": "64x64 32x32 24x24 16x16",
+ "type": "image/x-icon"
+ },
+ {
+ "src": "logo192.png",
+ "type": "image/png",
+ "sizes": "192x192"
+ },
+ {
+ "src": "logo512.png",
+ "type": "image/png",
+ "sizes": "512x512"
+ }
+ ],
+ "start_url": ".",
+ "display": "standalone",
+ "theme_color": "#000000",
+ "background_color": "#ffffff"
+ }
+
+`;
+
+const robotsTXT = () => `# https://www.robotstxt.org/robotstxt.html
+User-agent: *
+`;
+
+module.exports = {
+ indexHTML,
+ manifestJSON,
+ robotsTXT,
+};
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-react/fileData/cluster/src.js b/CLI-Tools-MERN-Stack-beginners/configure-react/fileData/cluster/src.js
new file mode 100644
index 00000000..3961fa15
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-react/fileData/cluster/src.js
@@ -0,0 +1,160 @@
+const appCss = () => `
+.App {
+ text-align: center;
+ }
+
+ .App-logo {
+ height: 40vmin;
+ pointer-events: none;
+ }
+
+ @media (prefers-reduced-motion: no-preference) {
+ .App-logo {
+ animation: App-logo-spin infinite 20s linear;
+ }
+ }
+
+ .App-header {
+ background-color: #282c34;
+ min-height: 100vh;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ font-size: calc(10px + 2vmin);
+ color: white;
+ }
+
+ .App-link {
+ color: #61dafb;
+ }
+
+ @keyframes App-logo-spin {
+ from {
+ transform: rotate(0deg);
+ }
+ to {
+ transform: rotate(360deg);
+ }
+ }
+
+`;
+
+const appJs = () => `
+import "./App.css";
+import logo from './logo.svg';
+import Child from "./components/ChildComponent";
+function App() {
+ return (
+
+ );
+}
+
+export default App;
+`;
+
+const appTest = () => `
+import { render, screen } from '@testing-library/react';
+import App from './App';
+
+test('renders learn react link', () => {
+ render();
+ const linkElement = screen.getByText(/learn react/i);
+ expect(linkElement).toBeInTheDocument();
+});
+`;
+
+const indexCss = () => `
+body {
+ margin: 0;
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
+ 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
+ sans-serif;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+ }
+
+ code {
+ font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
+ monospace;
+ }
+
+`;
+
+const indexJs = () => `
+import React from "react";
+import ReactDOM from "react-dom/client";
+import "./index.css";
+import App from "./App";
+import reportWebVitals from "./reportWebVitals";
+
+const root = ReactDOM.createRoot(document.getElementById("root"));
+root.render(
+
+
+
+);
+reportWebVitals();
+
+`;
+
+const reportWebVitals = () => `
+const reportWebVitals = onPerfEntry => {
+ if (onPerfEntry && onPerfEntry instanceof Function) {
+ import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
+ getCLS(onPerfEntry);
+ getFID(onPerfEntry);
+ getFCP(onPerfEntry);
+ getLCP(onPerfEntry);
+ getTTFB(onPerfEntry);
+ });
+}
+};
+
+export default reportWebVitals;
+
+`;
+
+const setupTests = () => `
+import "@testing-library/jest-dom";
+`;
+
+const logoSvg = () =>
+ ``;
+//
+
+const childComponent = () => `import React from "react";
+
+const ChildComponent = () => {
+ return This is Child Component
;
+};
+export default ChildComponent;
+`;
+
+module.exports = {
+ appCss,
+ appJs,
+ appTest,
+ indexCss,
+ indexJs,
+ reportWebVitals,
+ setupTests,
+ logoSvg,
+ childComponent,
+};
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-react/index.js b/CLI-Tools-MERN-Stack-beginners/configure-react/index.js
new file mode 100755
index 00000000..0aed5c7f
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-react/index.js
@@ -0,0 +1,242 @@
+#!/usr/bin/env node
+
+var shell = require("shelljs");
+const path = require("path");
+const fs = require("fs");
+
+const { Command } = require("commander");
+const program = new Command();
+
+const welcome = require("./commands/welcome");
+
+// show this welcome at the end of the command run
+
+//======================================================= Trial 1 =======================================================
+// take multiple arguments as commands and pass them to the action function
+
+// get multple arguments as commands and pass them to the action functions as an array
+
+program
+ .command("inner")
+ .argument("", "project name to delete")
+ .addCommand(
+ new Command("inner2")
+ .argument("", "project name to delete")
+ .action(function () {
+ console.log("inner2");
+ })
+ );
+
+// ====================== 1st approach ======================
+
+program
+ .command("delete")
+ .argument("", "project name to delete")
+ .description(` delete the project in Seconds`)
+ .action(function () {
+ shell.exec(`rm -rf ${this.args}`);
+ });
+// create the tailwind Configure ReactJs App
+
+program
+ .command("tailwind")
+ .argument("", "project name to delete")
+ .description(` Create Tailwind Configure ReactJs App`)
+ .action(function () {
+ if (this.args.length !== 0) {
+ const createTailwindReactApp = require("./commands/tailwind.command");
+ createTailwindReactApp(this.args);
+ } else {
+ console.log("Please Provide the Project Name");
+ shell.exit();
+ }
+ });
+
+// create the tailwind Configure ReactJs Redux App
+
+program
+ .command("react-redux-app")
+ .argument("", "project name to delete")
+ .description(` Create Tailwind Configure React Redux App`)
+ .action(function () {
+ if (this.args.length !== 0) {
+ const createTailwindReactApp = require("./commands/react-redux-app.command");
+ createTailwindReactApp(this.args);
+ } else {
+ console.log("Please Provide the Project Name");
+ shell.exit();
+ }
+ });
+
+// create the tailwind Configure NextJs App
+program
+ .command("next-app")
+ .argument("", "project name to create Next app")
+ .description(` Create Tailwind Configure NextJs App`)
+ .action(function () {
+ if (this.args.length !== 0) {
+ const createTailwindNextApp = require("./commands/next-app.command");
+ createTailwindNextApp(this.args);
+ } else {
+ console.log("Please Provide the Project Name");
+ shell.exit();
+ }
+ });
+
+//
+program
+ .command("redux")
+ .argument("", "redux name to create")
+ .description(` Create Redux Folder`)
+ .action(function () {
+ if (this.args.length !== 0) {
+ const createRedux = require("./commands/redux.command.js");
+ createRedux(this.args);
+ }
+ });
+
+// Configure Chakra UI
+program
+ .command("chakra-ui")
+ .argument("", "project name to create Chakra UI")
+ .description(` Create Chakra UI`)
+ .action(function () {
+ if (this.args.length !== 0) {
+ const createChakraUi = require("./commands/chakraUi.command.js");
+ createChakraUi(this.args);
+ }
+ });
+
+// Configure Context API
+program
+ .command("context-api")
+ .argument("", "project name to create Context API")
+ .description(` Create Context API`)
+ .action(function () {
+ if (this.args.length !== 0) {
+ const createContextApi = require("./commands/createContextApi.command.js");
+ createContextApi(this.args);
+ }
+ });
+
+// Create Browser Router and Routes Folder
+program
+ .command("browser-router")
+ .argument("", "project name to create Browser Router")
+ .description(` Create Browser Router`)
+ .action(function () {
+ if (this.args.length !== 0) {
+ const createRoutes = require("./commands/createRoutes.command.js");
+ createRoutes(this.args);
+ }
+ });
+
+// Congigure Axios
+program
+ .command("axios")
+ .argument("", "project name to create Axios")
+ .description(` Create Axios`)
+ .action(function () {
+ if (this.args.length !== 0) {
+ const createAxios = require("./commands/createAxios.command.js");
+ createAxios(this.args);
+ }
+ });
+
+// Configure Utils Folder
+program
+ .command("utils")
+ .argument("", "project name to create Utils Folder")
+ .description(` Create Utils Folder`)
+ .action(function () {
+ if (this.args.length !== 0) {
+ const createUtils = require("./commands/createUtils.command.js");
+ createUtils(this.args);
+ }
+ });
+
+// Configure Redux Thunk
+program
+ .command("redux-thunk")
+ .argument("", "project name to create Redux Thunk")
+ .description(` Create Redux Thunk`)
+ .action(function () {
+ if (this.args.length !== 0) {
+ const createReduxThunk = require("./commands/createReduxThunk.command.js");
+ createReduxThunk(this.args);
+ }
+ });
+
+// Configure Redux Saga
+program
+ .command("redux-saga")
+ .argument("", "project name to create Redux Saga")
+ .description(` Create Redux Saga`)
+ .action(function () {
+ if (this.args.length !== 0) {
+ const createReduxSaga = require("./commands/createReduxSaga.command.js");
+ createReduxSaga(this.args);
+ }
+ });
+
+// Configure Redux Persist
+program
+ .command("redux-persist")
+ .argument("", "project name to create Redux Persist")
+ .description(` Create Redux Persist`)
+ .action(function () {
+ if (this.args.length !== 0) {
+ const createReduxPersist = require("./commands/createReduxPersist.command.js");
+ createReduxPersist(this.args);
+ }
+ });
+
+// refresh the files
+program
+ .command("refresh")
+ .argument("", "project name to refresh")
+ .description(` Refresh the files`)
+ .action(function () {
+ if (this.args.length !== 0) {
+ const refreshFiles = require("./commands/refresh.command.js");
+ refreshFiles(this.args);
+ }
+ });
+
+// Create BigReact Project that contains list of small react projects
+program
+ .command("create-cluster")
+ .argument("", "project name to create Big React Project")
+ .description(` Create Big React Project`)
+ .action(function () {
+ if (this.args.length !== 0) {
+ const creaeteCluster = require("configure-react/commands/createReactCluster.command");
+ creaeteCluster(this.args);
+ }
+ });
+
+// Create Cluster App == small React Project
+program
+ .command("cluster-app")
+ .argument("", "project name to create Cluster App")
+ .description(` Create Cluster App`)
+ .action(function () {
+ if (this.args.length !== 0) {
+ const createClusterApp = require("configure-react/commands/createClusterApp.command");
+ createClusterApp(this.args);
+ }
+ });
+
+// install package in cluster app
+program
+ .command("ic")
+ .argument("", "project name to install package in Cluster App")
+ .description(` Install package in Cluster App`)
+ .action(function () {
+ if (this.args.length !== 0) {
+ const installClusterApp = require("configure-react/commands/installClusterApp.command");
+ installClusterApp(this.args);
+ }
+ });
+
+program.parse();
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-react/package-lock.json b/CLI-Tools-MERN-Stack-beginners/configure-react/package-lock.json
new file mode 100644
index 00000000..a7574959
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-react/package-lock.json
@@ -0,0 +1,515 @@
+{
+ "name": "configure-react",
+ "version": "1.0.3",
+ "lockfileVersion": 2,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "configure-react",
+ "version": "1.0.3",
+ "license": "MIT",
+ "dependencies": {
+ "@tos_/cli-welcome": "^1.0.2",
+ "commander": "^9.0.0",
+ "prettier": "^2.7.1",
+ "shelljs": "^0.8.5"
+ },
+ "bin": {
+ "configure-react": "index.js"
+ }
+ },
+ "node_modules/@tos_/cli-welcome": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@tos_/cli-welcome/-/cli-welcome-1.0.2.tgz",
+ "integrity": "sha512-eXe/ctFQO2CqgT6i34bzqepaRBm8gTCq6/MU5PRTsnx1KOIjca0Dft/IfRpWY1DxgHz2MJtcCMZUkilfruWAbg==",
+ "dependencies": {
+ "chalk": "^4.1.2",
+ "clear-any-console": "^1.16.2"
+ }
+ },
+ "node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/balanced-match": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
+ },
+ "node_modules/brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/chalk": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "dependencies": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
+ "node_modules/clear-any-console": {
+ "version": "1.16.2",
+ "resolved": "https://registry.npmjs.org/clear-any-console/-/clear-any-console-1.16.2.tgz",
+ "integrity": "sha512-OL/7wZpNy9x0GBSzz3poWja84Nr7iaH8aYNsJ5Uet2BVLj6Lm1zvWpZN/yH46Vv3ae7YfHmLLMmfHj911fshJg=="
+ },
+ "node_modules/color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ }
+ },
+ "node_modules/color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
+ },
+ "node_modules/commander": {
+ "version": "9.4.1",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-9.4.1.tgz",
+ "integrity": "sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw==",
+ "engines": {
+ "node": "^12.20.0 || >=14"
+ }
+ },
+ "node_modules/concat-map": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="
+ },
+ "node_modules/fs.realpath": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw=="
+ },
+ "node_modules/function-bind": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
+ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
+ },
+ "node_modules/glob": {
+ "version": "7.2.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
+ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+ "dependencies": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.1.1",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/has": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
+ "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
+ "dependencies": {
+ "function-bind": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.4.0"
+ }
+ },
+ "node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/inflight": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+ "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
+ "dependencies": {
+ "once": "^1.3.0",
+ "wrappy": "1"
+ }
+ },
+ "node_modules/inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
+ },
+ "node_modules/interpret": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz",
+ "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==",
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/is-core-module": {
+ "version": "2.10.0",
+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz",
+ "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==",
+ "dependencies": {
+ "has": "^1.0.3"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/once": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
+ "dependencies": {
+ "wrappy": "1"
+ }
+ },
+ "node_modules/path-is-absolute": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+ "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/path-parse": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
+ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw=="
+ },
+ "node_modules/prettier": {
+ "version": "2.7.1",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz",
+ "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==",
+ "bin": {
+ "prettier": "bin-prettier.js"
+ },
+ "engines": {
+ "node": ">=10.13.0"
+ },
+ "funding": {
+ "url": "https://github.com/prettier/prettier?sponsor=1"
+ }
+ },
+ "node_modules/rechoir": {
+ "version": "0.6.2",
+ "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
+ "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==",
+ "dependencies": {
+ "resolve": "^1.1.6"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/resolve": {
+ "version": "1.22.1",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz",
+ "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==",
+ "dependencies": {
+ "is-core-module": "^2.9.0",
+ "path-parse": "^1.0.7",
+ "supports-preserve-symlinks-flag": "^1.0.0"
+ },
+ "bin": {
+ "resolve": "bin/resolve"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/shelljs": {
+ "version": "0.8.5",
+ "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz",
+ "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==",
+ "dependencies": {
+ "glob": "^7.0.0",
+ "interpret": "^1.0.0",
+ "rechoir": "^0.6.2"
+ },
+ "bin": {
+ "shjs": "bin/shjs"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/supports-preserve-symlinks-flag": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
+ "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/wrappy": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
+ }
+ },
+ "dependencies": {
+ "@tos_/cli-welcome": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@tos_/cli-welcome/-/cli-welcome-1.0.2.tgz",
+ "integrity": "sha512-eXe/ctFQO2CqgT6i34bzqepaRBm8gTCq6/MU5PRTsnx1KOIjca0Dft/IfRpWY1DxgHz2MJtcCMZUkilfruWAbg==",
+ "requires": {
+ "chalk": "^4.1.2",
+ "clear-any-console": "^1.16.2"
+ }
+ },
+ "ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "requires": {
+ "color-convert": "^2.0.1"
+ }
+ },
+ "balanced-match": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
+ },
+ "brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "requires": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "chalk": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "requires": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ }
+ },
+ "clear-any-console": {
+ "version": "1.16.2",
+ "resolved": "https://registry.npmjs.org/clear-any-console/-/clear-any-console-1.16.2.tgz",
+ "integrity": "sha512-OL/7wZpNy9x0GBSzz3poWja84Nr7iaH8aYNsJ5Uet2BVLj6Lm1zvWpZN/yH46Vv3ae7YfHmLLMmfHj911fshJg=="
+ },
+ "color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "requires": {
+ "color-name": "~1.1.4"
+ }
+ },
+ "color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
+ },
+ "commander": {
+ "version": "9.4.1",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-9.4.1.tgz",
+ "integrity": "sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw=="
+ },
+ "concat-map": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="
+ },
+ "fs.realpath": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw=="
+ },
+ "function-bind": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
+ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
+ },
+ "glob": {
+ "version": "7.2.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
+ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+ "requires": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.1.1",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ }
+ },
+ "has": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
+ "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
+ "requires": {
+ "function-bind": "^1.1.1"
+ }
+ },
+ "has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
+ },
+ "inflight": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+ "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
+ "requires": {
+ "once": "^1.3.0",
+ "wrappy": "1"
+ }
+ },
+ "inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
+ },
+ "interpret": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz",
+ "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA=="
+ },
+ "is-core-module": {
+ "version": "2.10.0",
+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz",
+ "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==",
+ "requires": {
+ "has": "^1.0.3"
+ }
+ },
+ "minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "requires": {
+ "brace-expansion": "^1.1.7"
+ }
+ },
+ "once": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
+ "requires": {
+ "wrappy": "1"
+ }
+ },
+ "path-is-absolute": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+ "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg=="
+ },
+ "path-parse": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
+ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw=="
+ },
+ "prettier": {
+ "version": "2.7.1",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz",
+ "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g=="
+ },
+ "rechoir": {
+ "version": "0.6.2",
+ "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
+ "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==",
+ "requires": {
+ "resolve": "^1.1.6"
+ }
+ },
+ "resolve": {
+ "version": "1.22.1",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz",
+ "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==",
+ "requires": {
+ "is-core-module": "^2.9.0",
+ "path-parse": "^1.0.7",
+ "supports-preserve-symlinks-flag": "^1.0.0"
+ }
+ },
+ "shelljs": {
+ "version": "0.8.5",
+ "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz",
+ "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==",
+ "requires": {
+ "glob": "^7.0.0",
+ "interpret": "^1.0.0",
+ "rechoir": "^0.6.2"
+ }
+ },
+ "supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "requires": {
+ "has-flag": "^4.0.0"
+ }
+ },
+ "supports-preserve-symlinks-flag": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
+ "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w=="
+ },
+ "wrappy": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
+ }
+ }
+}
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-react/package.json b/CLI-Tools-MERN-Stack-beginners/configure-react/package.json
new file mode 100644
index 00000000..2293304c
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-react/package.json
@@ -0,0 +1,40 @@
+{
+ "name": "configure-react",
+ "version": "1.0.5",
+ "description": "Easily configure React App with Any Framework or Library like Bootstrap, Material UI, Tailwind CSS, etc. And also configure with any state management library like Redux, MobX, etc. and also configure with any routing library like React Router, Reach Router, etc. and also configure with any testing library like Jest, Enzyme, etc. and also configure with any form library like Formik, React Hook Form, etc. and also configure with any styling library like Styled Components, Emotion, etc. and also configure with any GraphQL library like Apollo Client, Relay, etc. and also configure with any i18n library like i18next, react-intl, etc. ",
+ "main": "index.js",
+ "scripts": {
+ "server": "nodemon src/index"
+ },
+ "keywords": [
+ "tailwind-react-app",
+ "tailwind-gastby-app",
+ "tailwind-angular-app",
+ "tailwind-next-app",
+ "tailwind-nuxt-app",
+ "tailwindcss-configure-react-app",
+ "tailwind-next-configure-app"
+ ],
+ "author": {
+ "name": "Shantanu Bombatkar",
+ "email": "shodkkshantanu@gmail.com",
+ "url": "https://github.com/shaantanu9"
+ },
+ "files": [
+ "commands/*",
+ "index.js",
+ "utils/*",
+ "fileData/*"
+ ],
+ "bin": {
+ "configure-react": "index.js",
+ "cr": "index.js"
+ },
+ "license": "MIT",
+ "dependencies": {
+ "@tos_/cli-welcome": "^1.0.2",
+ "commander": "^9.0.0",
+ "prettier": "^2.7.1",
+ "shelljs": "^0.8.5"
+ }
+}
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-react/readme.md b/CLI-Tools-MERN-Stack-beginners/configure-react/readme.md
new file mode 100644
index 00000000..4bca9ee0
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-react/readme.md
@@ -0,0 +1,140 @@
+# configure-react
+
+[Site](https://configure-react.netlify.app/) |
+[Docs](https://configure-react.netlify.app/docs) |
+[Contributing](https://github.com/shaantanu9/configure-react) |
+[Code of Conduct](https://code-of-conduct.openjsf.org) |
+[Twitter](https://twitter.com/ShantanuMali9) |
+[Chat](https://gitter.im/shaantanu9)
+
+### Bored Writing and Creating the Same Folder Structure and Files for Every React Project?
+
+The [configure-react](https://configure-react.netlify.app/) is a simple Fast CLI that creates a React Project with your desired configuration.
+
+## $ npm i -g configure-react
+
+#### // it is CLI Base so need to install Globally
+
+## $ configure-react
+
+#### it will ask you some questions and create a React Project with your desired configuration
+
+## $ configure-react --help
+
+#### it will show you all the options
+
+## $ configure-react --version
+
+#### it will show you the version of the CLI
+
+## $ configure-react --update
+
+#### it will update the CLI to the latest version
+
+## $ configure-react --uninstall
+
+#### it will uninstall the CLI
+
+## $ configure-react --docs
+
+#### it will open the docs in your default browser
+
+## $ configure-react --site
+
+#### it will open the site in your default browser
+
+## $ configure-react --twitter
+
+#### it will open the twitter in your default browser
+
+## $ configure-react --chat
+
+#### it will open the gitter chat in your default browser
+
+## $ configure-react --coc
+
+#### it will open the code of conduct in your default browser
+
+## $ configure-react --contributing
+
+#### it will open the contributing in your default browser
+
+## $ configure-react --license
+
+#### it will show you the license
+
+## $ configure-react --author
+
+#### it will show you the author
+
+## $ configure-react --config
+
+#### it will show you the configuration
+
+### How to Use in Terminal:
+
+```js
+$ configure-react
+
+```
+
+## Go Through the Already Build Templates
+
+**configure-react** is released under the [MIT license](https://github.com/shaantanu9/configure-react/blob/main/LICENSE) & supports modern environments.
+
+#### Please Star the [Repo](https://github.com/shaantanu9/configure-react) on GitHub and Share with Other Fellow Developers
+
+## Installation
+
+Using npm:
+
+```shell
+$ npm i -g configure-react
+// it is CLI Base so need to install Globally
+
+$ npm i configure-react
+```
+
+Note: add `--save` if you are using npm < 5.0.0
+
+Bore Configuring Tailwind for React App, or any other Framework Try this Package Once.
+
+## Why configure-react?
+
+Programming is all About simplifying and Automating Stuff
+
+### Then Why Build Same BoilerPlate Again and Again
+
+Use this Package and (getAwayFromThePain) create Express+Mongoose BoilerPlate
+
+- Get Read of Wrting and Creating Same Thing
+- Directly Start Working on the real Logic
+- Reduce time of Development by atleast 10%
+
+### Please Contribute Models and Controllers
+
+#### Become a [Open Source Contributer](https://github.com/shaantanu9/configure-react)
+
+We **configure-react** wants to help Each and Every Programmer Writing real Logical code, without **wasting time** of Generating the MVC Schema.
+
+So We are Here to Add as much as Models and Controllers and Other important files as Possible
+
+### How can You Support and Help others?
+
+If you have written any **unique schema**, Add that to this list, How?Simple
+
+- Go the [Github Repo](https://github.com/shaantanu9/configure-react)
+- Fork that Repo
+- Clone and Download it and Add the File in given manner.
+- Add the Changes and push to your account.
+- Upload in your Repo => Pull Request and Done
+
+## Licence
+
+MIT
+
+#### I love to work with Open Source Projects
+
+#### Contact Me [Twitter](https://twitter.com/ShantanuMali9) [Linkedin](https://www.linkedin.com/in/shantanu-bombatkar)
+
+## Keywords
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-react/utils/checkIfRoot.js b/CLI-Tools-MERN-Stack-beginners/configure-react/utils/checkIfRoot.js
new file mode 100644
index 00000000..400f4054
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-react/utils/checkIfRoot.js
@@ -0,0 +1,25 @@
+const shell = require("shelljs");
+const path = require("path");
+const fs = require("fs");
+
+const checkIfRoot = (args) => {
+ if (args[0] !== ".") return false;
+ const currentPath = process.cwd();
+ console.log(currentPath, "currentPath");
+ const packageJsonPath = path.join(currentPath, "./package.json");
+ const packageJsonData = fs.readFileSync(packageJsonPath, "utf8");
+
+ const packageJsonDataObject = JSON.parse(packageJsonData);
+ const packageJsonDataObjectScripts = packageJsonDataObject.scripts;
+ if (
+ packageJsonDataObjectScripts["start"] !== "react-scripts start" ||
+ packageJsonDataObject.dependencies.react === undefined
+ ) {
+ console.log("first if");
+ return false;
+ }
+ console.log("returning true");
+ return true;
+};
+
+module.exports = checkIfRoot;
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-react/utils/createComponent.js b/CLI-Tools-MERN-Stack-beginners/configure-react/utils/createComponent.js
new file mode 100644
index 00000000..43adcda1
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-react/utils/createComponent.js
@@ -0,0 +1,12 @@
+const fs = require("fs");
+const shell = require("shelljs");
+const createComponent = (componentPath) => {
+ // if file not exist, create it
+
+ if (!fs.existsSync(componentPath)) {
+ shell.mkdir("-p", componentPath); // -p flag creates parent directories if they don't exist
+ shell.touch(componentPath + "/Login.js");
+ }
+};
+
+module.exports = createComponent;
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-react/utils/createDotEnv.js b/CLI-Tools-MERN-Stack-beginners/configure-react/utils/createDotEnv.js
new file mode 100644
index 00000000..a66f3862
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-react/utils/createDotEnv.js
@@ -0,0 +1,19 @@
+const fs = require("fs");
+const detail = require("../commands/details.json");
+const createEnv = (envPath) => {
+ const envData = detail.envData.join("\n");
+ // if file not exist, create it
+ if (!fs.existsSync(envPath)) {
+ // shell.touch(envPath);
+ // fs to create file
+ fs.writeFileSync(envPath, "", "utf8", (err) => {
+ if (err) throw err;
+ });
+ }
+ // edit .env
+ fs.appendFileSync(envPath, envData, "utf8", (err) => {
+ if (err) throw err;
+ });
+};
+
+module.exports = createEnv;
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-react/utils/createFile.js b/CLI-Tools-MERN-Stack-beginners/configure-react/utils/createFile.js
new file mode 100644
index 00000000..55c3c0b1
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-react/utils/createFile.js
@@ -0,0 +1,10 @@
+const fs = require("fs");
+const makeCodePritter = require("./makeCodePritter");
+const createFile = (path, content) => {
+ fs.writeFileSync(path, makeCodePritter(content), "utf8", (err) => {
+ if (err) throw err;
+ });
+};
+//
+
+module.exports = createFile;
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-react/utils/createFolder.js b/CLI-Tools-MERN-Stack-beginners/configure-react/utils/createFolder.js
new file mode 100644
index 00000000..832a3468
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-react/utils/createFolder.js
@@ -0,0 +1,12 @@
+const fs = require("fs");
+const path = require("path");
+const createFolder = (folderPath, folderName) => {
+ const newFolderPath = path.join(folderPath, folderName);
+ if (!fs.existsSync(newFolderPath)) {
+ fs.mkdirSync(newFolderPath);
+ } else {
+ console.log("Folder already exists");
+ }
+};
+
+module.exports = createFolder;
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-react/utils/editReadme.js b/CLI-Tools-MERN-Stack-beginners/configure-react/utils/editReadme.js
new file mode 100644
index 00000000..8a7ea47e
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-react/utils/editReadme.js
@@ -0,0 +1,33 @@
+const fs = require("fs");
+const editReadme = (readmePath, content) => {
+ try {
+ const readme = fs.readFileSync(readmePath, "utf8");
+ const readmeContent = readme.split("\n");
+ //if readContent includes "## Installation" then replace the content between "## Installation" and "## Usage" with the content
+
+ const present = readmeContent.includes(
+ "# Getting Started with configure-react"
+ );
+ if (present) {
+ const line = `${content} is Created/Configure with [configure-react](https://github.com/shaantanu9/configure-react)`;
+ const index = readmeContent.indexOf(
+ "# Getting Started with configure-react"
+ );
+ if (!readmeContent.includes(line))
+ readmeContent.splice(index + 2, 0, line);
+ } else {
+ const line = `# Getting Started with configure-react
+This project was bootstrapped with [configure-react](https://github.com/shaantanu9/configure-react).
+${content} is Created with [configure-react](https://github.com/shaantanu9/configure-react)
+`;
+ readmeContent.splice(4, 0, line);
+ }
+
+ fs.writeFileSync(readmePath, readmeContent.join("\n"), (err, data) => {});
+ } catch (error) {
+ console.log(readmePath, "readmePath");
+ // fs.writeFileSync(readmePath + "/" + content, content, (err, data) => {});
+ }
+};
+
+module.exports = editReadme;
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-react/utils/endingScreen.js b/CLI-Tools-MERN-Stack-beginners/configure-react/utils/endingScreen.js
new file mode 100644
index 00000000..b261b993
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-react/utils/endingScreen.js
@@ -0,0 +1,16 @@
+const endingScreen = (name = "") => {
+ console.log("\n", "\n");
+ console.log("\n", "\n");
+ console.log("\x1b[32m", `${name} configured successfully`);
+ console.log("\n");
+ console.log("\x1b[32m", "By Configure React By Shantanu Bombatkar ");
+ console.log("\x1b[0m", "https://github.com/shaantanu9/configure-react ");
+ console.log("\n");
+ console.log("\x1b[32m", "For more commands type:");
+ console.log("\x1b[33m", "npx configure-react -h");
+ console.log("\n");
+ console.log("Thank you for using Configure React");
+ console.log("\n");
+};
+
+module.exports = endingScreen;
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-react/utils/ifNotDot.js b/CLI-Tools-MERN-Stack-beginners/configure-react/utils/ifNotDot.js
new file mode 100644
index 00000000..75aee24f
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-react/utils/ifNotDot.js
@@ -0,0 +1,17 @@
+// if the last character is not dot then create react app and go inside that folder
+// and install the dependencies
+// const sameFileExist = require("./sameFileExist");
+const shell = require("shelljs");
+const path = require("path");
+
+const ifNotDot = (projectName) => {
+ console.log("ifNotDot function called");
+ if (projectName.charAt(projectName.length - 1) !== ".") {
+ shell.exec(`npx create-react-app ${projectName}`);
+ shell.cd(projectName);
+ } else {
+ return false;
+ }
+};
+
+module.exports = ifNotDot;
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-react/utils/importAtTop.js b/CLI-Tools-MERN-Stack-beginners/configure-react/utils/importAtTop.js
new file mode 100644
index 00000000..624970fe
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-react/utils/importAtTop.js
@@ -0,0 +1,23 @@
+const fs = require("fs");
+const makeCodePritter = require("configure-react/utils/makeCodePritter");
+const importAtTop = (path, importWhat, importFrom) => {
+ const fileData = fs.readFileSync(path, "utf8");
+ const fileDataArray = fileData.split("\n");
+ const importIndex = fileDataArray.findIndex((line) =>
+ line.includes(importWhat)
+ );
+ console.log("importIndex", importIndex);
+ if (importIndex === -1) {
+ fileDataArray.splice(1, 0, `import ${importWhat} from "${importFrom}"`);
+ fs.writeFileSync(
+ path,
+ makeCodePritter(fileDataArray.join("\n")),
+ "utf8",
+ (err) => {
+ if (err) throw err;
+ }
+ );
+ }
+};
+
+module.exports = importAtTop;
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-react/utils/index.js b/CLI-Tools-MERN-Stack-beginners/configure-react/utils/index.js
new file mode 100644
index 00000000..48493a10
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-react/utils/index.js
@@ -0,0 +1,26 @@
+const editReadme = require("./editReadme");
+const checkIfRoot = require("./checkIfRoot");
+const importAtTop = require("./importAtTop");
+const createComponent = require("./createComponent");
+const makeCodePritter = require("./makeCodePritter");
+const wrapTagAround = require("./wrapTagAround");
+const createDotEnv = require("./createDotEnv");
+const endingScreen = require("./endingScreen");
+const ifNotDot = require("./ifNotDot");
+const createFolder = require("./createFolder");
+const createFile = require("configure-react/utils/createFile.js");
+const sameFileExists = require("./sameFileExists");
+module.exports = {
+ editReadme,
+ checkIfRoot,
+ importAtTop,
+ createComponent,
+ makeCodePritter,
+ wrapTagAround,
+ createDotEnv,
+ endingScreen,
+ ifNotDot,
+ createFolder,
+ createFile,
+ sameFileExists,
+};
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-react/utils/makeCodePritter.js b/CLI-Tools-MERN-Stack-beginners/configure-react/utils/makeCodePritter.js
new file mode 100644
index 00000000..c7571b22
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-react/utils/makeCodePritter.js
@@ -0,0 +1,11 @@
+// make the code prettier
+
+const pritter = require("prettier");
+
+const makeCodePritter = (code) => {
+ const prettierConfig = pritter.resolveConfig.sync("./");
+ const prettierCode = pritter.format(code, prettierConfig);
+ return prettierCode;
+};
+
+module.exports = makeCodePritter;
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-react/utils/sameFileExists.js b/CLI-Tools-MERN-Stack-beginners/configure-react/utils/sameFileExists.js
new file mode 100644
index 00000000..0ddd5a09
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-react/utils/sameFileExists.js
@@ -0,0 +1,17 @@
+// documenting the function
+/**
+ * @param {string} fileName
+ * @returns {boolean}
+ * @description checks if the file exists in the current directory
+ * @example
+ * sameFileExists("index.js"); // true
+ **/
+
+const fs = require("fs");
+const sameFileExists = (fileName) => {
+ const files = fs.readdirSync("./");
+ return files.includes(fileName);
+};
+
+// Return True if file exists
+module.exports = sameFileExists;
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-react/utils/wrapTagAround.js b/CLI-Tools-MERN-Stack-beginners/configure-react/utils/wrapTagAround.js
new file mode 100644
index 00000000..f76519eb
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-react/utils/wrapTagAround.js
@@ -0,0 +1,53 @@
+const fs = require("fs");
+const shell = require("shelljs");
+const path = require("path");
+const makeCodePritter = require("configure-react/utils/makeCodePritter");
+const wrapTagAround = (
+ tag,
+ path,
+ importModule,
+ importModuleFrom = importModule
+) => {
+ const file = fs.readFileSync(path, "utf8");
+ const fileArray = file.split("\n");
+ const trimmedFileArray = fileArray.map((line) => line.trim()); // remove space from start and end of line
+ // console.log(
+ // !fileArray.includes(`import ${importModule} from '${importModuleFrom}';`),
+ // "fileArray includes import" + importModule,
+ // `import ${importModule} from '${importModuleFrom}';`,
+ // fileArray
+ // );
+ if (
+ !trimmedFileArray.includes(
+ `import ${importModule} from '${importModuleFrom}';`
+ ) &&
+ !fileArray.includes(`import ${importModule} from '${importModuleFrom}';`)
+ ) {
+ fileArray.splice(
+ 1,
+ 0,
+ `import ${importModule} from '${importModuleFrom}';`
+ );
+ }
+
+ const index = fileArray.findIndex((line) => {
+ line = line.trim().replace(" ", "");
+ return line.includes("");
+ });
+ // if tag are not present then add the tag
+ if (!fileArray.includes(`<${tag}>`)) {
+ fileArray.splice(index, 0, `<${tag}>`);
+ fileArray.splice(index + 2, 0, `${tag}>`);
+ }
+
+ fs.writeFileSync(path, makeCodePritter(fileArray.join("\n")));
+
+ // fs.writeFileSync(path, fileArray.join("\n"), "utf8");
+};
+
+// const file = fs.readFileSync(path, "utf-8");
+// const wrappedFile = `<${tag}>${file}${tag}>`;
+// fs.writeFileSync(path, wrappedFile);
+// };
+
+module.exports = wrapTagAround;
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-tailwind/commands/details.json b/CLI-Tools-MERN-Stack-beginners/configure-tailwind/commands/details.json
new file mode 100644
index 00000000..cec57ee9
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-tailwind/commands/details.json
@@ -0,0 +1,117 @@
+{
+ "reactApp": {
+ "appJsFileCode": [
+ "import RoutesLink from './router/RoutesLink' //importing the Routes component",
+ "function App() {",
+ " return (",
+ " ",
+ "
",
+ " Hello world!",
+ "
",
+ " ",
+ " ",
+ " );",
+ "}",
+ "",
+ "export default App;"
+ ],
+ "indexFileCode": [
+ "import React from 'react';",
+ "import { createRoot } from 'react-dom/client';",
+ "import { Provider } from 'react-redux';",
+ "import { store } from './app/store';",
+ "import App from './App';",
+ "import reportWebVitals from './reportWebVitals';",
+ "import './index.css';",
+ "import { BrowserRouter} from 'react-router-dom';",
+ "",
+ "const container = document.getElementById('root');",
+ "const root = createRoot(container);",
+ "",
+ "root.render(",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ ");",
+ "",
+ "// If you want to start measuring performance in your app, pass a function",
+ "// to log results (for example: reportWebVitals(console.log))",
+ "// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals",
+ "reportWebVitals();",
+ ""
+ ],
+ "routerFileCode": [
+ "// eslint-disable-next-line",
+ "import { Route, Routes, BrowserRouter, Switch, Navigate } from 'react-router-dom';",
+ "import React from 'react';",
+ "// import LoginUser from '../components/LoginUser' //importing the LoginUser component",
+ "",
+ "//import {useState, useEffect,useRef} from 'react'",
+ "//import Routes from './components/Routes' //importing the Routes component",
+ "const RoutesLink = (props)=>{",
+ "",
+ " // get token from localstorage",
+ " ",
+ " // if token present return true",
+ " // if admin present return true",
+ " // console.log(isAdmin, 'isAuthenticated');",
+ "",
+ "",
+ "return(",
+ "<>",
+ " ",
+ " {/* : } /> */}",
+ " {/* :}/> */}",
+ " {/* } /> */}",
+ " {/* } /> */}",
+ "",
+ "",
+ ">",
+ "",
+ ")",
+ "}",
+ "",
+ "export default RoutesLink;"
+ ]
+ },
+ "tailwindReactConfigData": [
+ " module.exports = {",
+ " content: [",
+ " './src/**/*.{js,jsx,ts,tsx}',",
+ " ],",
+ " theme: {",
+ " extend: {},",
+ " },",
+ " plugins: [],",
+ " }"
+ ],
+ "tailwindNextConfigData": [
+ " module.exports = {",
+ " content: [",
+ " './pages/**/*.{js,ts,jsx,tsx}',",
+ " './components/**/*.{js,ts,jsx,tsx}',",
+ " ],",
+ "",
+ " theme: {",
+ " extend: {},",
+ " },",
+ " plugins: [],",
+ " }"
+ ],
+ "srcIndexCSSData": [
+ "@tailwind base; @tailwind components; @tailwind utilities"
+ ],
+ "NextIndexData": [
+ "export default function Home() {",
+ " return (",
+ " ",
+ " Hello world!",
+ "
",
+ " )",
+ "}"
+ ]
+}
\ No newline at end of file
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-tailwind/commands/next-app.command.js b/CLI-Tools-MERN-Stack-beginners/configure-tailwind/commands/next-app.command.js
new file mode 100644
index 00000000..d27a80ae
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-tailwind/commands/next-app.command.js
@@ -0,0 +1,63 @@
+const shell = require("shelljs");
+const path = require("path");
+const details = require("./details.json");
+// console.log(details.reactApp.appJsData.join("\n"))
+
+const editAppJs = () => {
+ indexJsData = details.NextIndexData.join("\n");
+
+ const fs = require("fs");
+
+ // shell.exec('rm -rf '+path.join(shell.pwd()+'/src/App.css'))
+ fs.writeFileSync(
+ path.join(shell.pwd() + "/pages/index.js"),
+ indexJsData,
+ (err, data) => {}
+ );
+ shell.exec("npm run dev");
+};
+
+const runBuild = () => {
+ editAppJs();
+};
+
+const editTaiwindConfig = () => {
+ const fs = require("fs");
+
+ tailwindNextConfigData = details.tailwindNextConfigData.join("\n");
+
+ srcIndexCSSData = details.srcIndexCSSData.join("\n");
+
+ fs.writeFileSync(
+ path.join(shell.pwd() + "/tailwind.config.js"),
+ tailwindNextConfigData,
+ (err, data) => {}
+ );
+ fs.writeFileSync(
+ path.join(shell.pwd() + "/styles/globals.css"),
+ srcIndexCSSData,
+ (err, data) => {}
+ );
+
+ runBuild();
+};
+
+const configureForTailwind = () => {
+ shell.exec("npm install -D tailwindcss postcss autoprefixer");
+ shell.touch("tailwind.config.js");
+
+ editTaiwindConfig();
+};
+
+const createTailwindNextApp = (name) => {
+ try {
+ shell.exec(`npx create-next-app ${name}`);
+ shell.cd(name);
+ configureForTailwind();
+ } catch (err) {
+ console.log(err.message);
+ shell.exit();
+ }
+};
+
+module.exports = createTailwindNextApp;
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-tailwind/commands/projectExist.js b/CLI-Tools-MERN-Stack-beginners/configure-tailwind/commands/projectExist.js
new file mode 100644
index 00000000..bf89e845
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-tailwind/commands/projectExist.js
@@ -0,0 +1,16 @@
+const fs = require("fs");
+
+projectExist = (path) => {
+ try {
+ if (fs.existsSync(`./${path}`)) {
+ //file exists
+ console.log(" Sorry Same Name File Already Exist, Try Another Name");
+ return true;
+ // shell.exit()
+ }
+ } catch (err) {
+ console.error("err");
+ }
+};
+
+module.exports = projectExist;
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-tailwind/commands/react-app.command.js b/CLI-Tools-MERN-Stack-beginners/configure-tailwind/commands/react-app.command.js
new file mode 100644
index 00000000..85ef1c54
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-tailwind/commands/react-app.command.js
@@ -0,0 +1,95 @@
+const shell = require("shelljs");
+const path = require("path");
+const details = require("./details.json");
+const fs = require('fs');
+// console.log(details.reactApp.appJsData.join("\n"))
+
+const installreactRouter = () => {
+ shell.exec(`npm i react-router-dom`);
+ shell.exec(`npm i react-dom`);
+};
+
+const editRouterJs = () => {
+ routerFileCode = details.reactApp.routerFileCode.join("\n");
+ fs.writeFileSync(
+ path.join(shell.pwd() + "/src/router/RoutesLink.js"),
+ routerFileCode,
+ (err, data) => {}
+ );
+};
+
+const createRouterFolder = () => {
+ shell.exec("mkdir " + path.join(shell.pwd() + "/src/router"));
+ shell.exec("mkdir " + path.join(shell.pwd() + "/src/components"));
+
+ shell.exec("touch " + path.join(shell.pwd() + "/src/router/index.js"));
+ shell.exec("touch " + path.join(shell.pwd() + "/src/router/RoutesLink.js"));
+ editRouterJs();
+};
+
+
+const editAppJs = () => {
+ appJsData = details.reactApp.appJsFileCode.join("\n");
+
+
+
+ shell.exec("rm -rf " + path.join(shell.pwd() + "/src/App.css"));
+ fs.writeFileSync(
+ path.join(shell.pwd() + "/src/App.js"),
+ appJsData,
+ (err, data) => {}
+ );
+ installreactRouter();
+ createRouterFolder();
+ shell.exec("npm run start");
+};
+
+const runBuild = () => {
+ editAppJs();
+};
+
+const editTaiwindConfig = () => {
+
+
+ tailwindReactConfigData = details.tailwindReactConfigData.join("\n");
+
+ srcIndexCSSData = details.srcIndexCSSData.join("\n");
+
+ fs.writeFileSync(
+ path.join(shell.pwd() + "/tailwind.config.js"),
+ tailwindReactConfigData,
+ (err, data) => {}
+ );
+ fs.writeFileSync(
+ path.join(shell.pwd() + "/src/index.css"),
+ srcIndexCSSData,
+ (err, data) => {}
+ );
+
+ runBuild();
+};
+
+const configureForTailwind = () => {
+ shell.exec("npm install -D tailwindcss postcss autoprefixer");
+ shell.touch("tailwind.config.js");
+
+ editTaiwindConfig();
+};
+
+const createTailwindReactApp = (name) => {
+ const projectExist = require("./projectExist");
+ if (projectExist(name) == true) {
+ shell.exit();
+ }
+
+ try {
+ shell.exec(`npx create-react-app ${name}`);
+ shell.cd(name);
+ configureForTailwind();
+ } catch (err) {
+ console.log(err.message);
+ shell.exit();
+ }
+};
+
+module.exports = createTailwindReactApp;
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-tailwind/commands/react-redux-app.command.js b/CLI-Tools-MERN-Stack-beginners/configure-tailwind/commands/react-redux-app.command.js
new file mode 100644
index 00000000..62be6c4e
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-tailwind/commands/react-redux-app.command.js
@@ -0,0 +1,107 @@
+const shell = require("shelljs");
+const path = require("path");
+const fs = require("fs");
+const details = require("./details.json");
+
+const installreactRouter = () => {
+ shell.exec(`npm i react-router-dom`);
+ shell.exec(`npm i react-dom`);
+};
+
+const editRouterJs = () => {
+ routerFileCode = details.reactApp.routerFileCode.join("\n");
+ fs.writeFileSync(
+ path.join(shell.pwd() + "/src/router/RoutesLink.js"),
+ routerFileCode,
+ (err, data) => {}
+ );
+};
+
+const createRouterFolder = () => {
+ shell.exec("mkdir " + path.join(shell.pwd() + "/src/router"));
+ shell.exec("mkdir " + path.join(shell.pwd() + "/src/components"));
+
+ shell.exec("touch " + path.join(shell.pwd() + "/src/router/index.js"));
+ shell.exec("touch " + path.join(shell.pwd() + "/src/router/RoutesLink.js"));
+ editRouterJs();
+};
+
+const editindexJs = () => {
+ indexFileCode = details.reactApp.indexFileCode.join("\n");
+
+ shell.exec("rm -rf " + path.join(shell.pwd() + "/src/index.js"));
+
+ shell.exec("touch " + path.join(shell.pwd() + "/src/index.js"));
+ shell.exec("touch " + path.join(shell.pwd() + "/src/index.js"));
+
+ fs.writeFileSync(
+ path.join(shell.pwd() + "/src/index.js"),
+ indexFileCode,
+ (err, data) => {}
+ );
+};
+
+const editAppJs = () => {
+ appJsData = details.reactApp.appJsFileCode.join("\n");
+
+ shell.exec("rm -rf " + path.join(shell.pwd() + "/src/App.css"));
+ editindexJs();
+ fs.writeFileSync(
+ path.join(shell.pwd() + "/src/App.js"),
+ appJsData,
+ (err, data) => {}
+ );
+ installreactRouter();
+
+ createRouterFolder();
+
+ shell.exec("npm run start");
+};
+
+const runBuild = () => {
+ editAppJs();
+};
+
+const editTaiwindConfig = () => {
+ tailwindReactConfigData = details.tailwindReactConfigData.join("\n");
+
+ srcIndexCSSData = details.srcIndexCSSData.join("\n");
+
+ fs.writeFileSync(
+ path.join(shell.pwd() + "/tailwind.config.js"),
+ tailwindReactConfigData,
+ (err, data) => {}
+ );
+ fs.writeFileSync(
+ path.join(shell.pwd() + "/src/index.css"),
+ srcIndexCSSData,
+ (err, data) => {}
+ );
+
+ runBuild();
+};
+
+const configureForTailwind = () => {
+ shell.exec("npm install -D tailwindcss postcss autoprefixer");
+ shell.touch("tailwind.config.js");
+
+ editTaiwindConfig();
+};
+
+const createTailwindReactApp = async (name) => {
+ const projectExist = require("./projectExist");
+ if (projectExist(name) == true) {
+ shell.exit();
+ }
+
+ try {
+ shell.exec(`npx create-react-app ${name} --template redux`);
+ shell.cd(name);
+ configureForTailwind();
+ } catch (err) {
+ console.log(err.message);
+ shell.exit();
+ }
+};
+
+module.exports = createTailwindReactApp;
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-tailwind/commands/welcome.js b/CLI-Tools-MERN-Stack-beginners/configure-tailwind/commands/welcome.js
new file mode 100644
index 00000000..d481eb19
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-tailwind/commands/welcome.js
@@ -0,0 +1,14 @@
+const welcome = require("@tos_/cli-welcome");
+
+const packageJson = require("../package.json");
+
+// OR with all the options set like this:
+module.exports = welcome({
+ title: `${packageJson.name}`,
+ tagLine: `by ${packageJson.author.name} ${packageJson.author.url}`,
+ bgColor: `#FADC00`,
+ color: `#FFFFFF`,
+ bold: true,
+ clear: true,
+ version: `${packageJson.version}`,
+});
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-tailwind/index.js b/CLI-Tools-MERN-Stack-beginners/configure-tailwind/index.js
new file mode 100755
index 00000000..eb7ea2e8
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-tailwind/index.js
@@ -0,0 +1,66 @@
+#!/usr/bin/env node
+
+var shell = require("shelljs");
+const path = require("path");
+const fs = require("fs");
+
+const { Command } = require("commander");
+const program = new Command();
+
+const welcome = require("./commands/welcome");
+
+program
+ .command("delete")
+ .argument("", "project name to delete")
+ .description(` delete the project in Seconds`)
+ .action(function () {
+ shell.exec(`rm -rf ${this.args}`);
+ });
+// create the tailwind Configure ReactJs App
+
+program
+ .command("react-app")
+ .argument("", "project name to delete")
+ .description(` Create Tailwind Configure ReactJs App`)
+ .action(function () {
+ if (this.args.length !== 0) {
+ const createTailwindReactApp = require("./commands/react-app.command");
+ createTailwindReactApp(this.args);
+ } else {
+ console.log("Please Provide the Project Name");
+ shell.exit();
+ }
+ });
+
+// create the tailwind Configure ReactJs Redux App
+
+program
+ .command("react-redux-app")
+ .argument("", "project name to delete")
+ .description(` Create Tailwind Configure React Redux App`)
+ .action(function () {
+ if (this.args.length !== 0) {
+ const createTailwindReactApp = require("./commands/react-redux-app.command");
+ createTailwindReactApp(this.args);
+ } else {
+ console.log("Please Provide the Project Name");
+ shell.exit();
+ }
+ });
+
+// create the tailwind Configure NextJs App
+program
+ .command("next-app")
+ .argument("", "project name to create Next app")
+ .description(` Create Tailwind Configure NextJs App`)
+ .action(function () {
+ if (this.args.length !== 0) {
+ const createTailwindNextApp = require("./commands/next-app.command");
+ createTailwindNextApp(this.args);
+ } else {
+ console.log("Please Provide the Project Name");
+ shell.exit();
+ }
+ });
+
+program.parse();
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-tailwind/package.json b/CLI-Tools-MERN-Stack-beginners/configure-tailwind/package.json
new file mode 100644
index 00000000..7b303881
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-tailwind/package.json
@@ -0,0 +1,36 @@
+{
+ "name": "configure-tailwind",
+ "version": "1.0.14",
+ "description": "Easily Create Any TailwindCSS Integrated App BoilerPlate",
+ "main": "index.js",
+ "scripts": {
+ "server": "nodemon src/index"
+ },
+ "keywords": [
+ "tailwind-react-app",
+ "tailwind-gastby-app",
+ "tailwind-angular-app",
+ "tailwind-next-app",
+ "tailwind-nuxt-app",
+ "tailwindcss-configure-react-app",
+ "tailwind-next-configure-app"
+ ],
+ "author": {
+ "name": "Shantanu Bombatkar",
+ "email": "shodkkshantanu@gmail.com",
+ "url": "https://github.com/shaantanu9"
+ },
+ "files": [
+ "commands/*",
+ "index.js"
+ ],
+ "bin": {
+ "createtailwind": "index.js"
+ },
+ "license": "MIT",
+ "dependencies": {
+ "@tos_/cli-welcome": "^1.0.2",
+ "commander": "^9.0.0",
+ "shelljs": "^0.8.5"
+ }
+}
\ No newline at end of file
diff --git a/CLI-Tools-MERN-Stack-beginners/configure-tailwind/readme.md b/CLI-Tools-MERN-Stack-beginners/configure-tailwind/readme.md
new file mode 100644
index 00000000..5868a635
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/configure-tailwind/readme.md
@@ -0,0 +1,88 @@
+# configure-tailwind
+
+[Site](https://configure-tailwind.netlify.app/) |
+[Docs](https://configure-tailwind.netlify.app/docs) |
+[Contributing](https://github.com/shaantanu9/configure-tailwind) |
+[Code of Conduct](https://code-of-conduct.openjsf.org) |
+[Twitter](https://twitter.com/ShantanuMali9) |
+[Chat](https://gitter.im/shaantanu9)
+
+### Bored Writing and Creating the Same Express MVC Folders Again and Again Here we Go
+The [configure-tailwind](https://configure-tailwind.netlify.app/) is a simple Fast CLI that create Express+Mongoose MVC pattern.
+
+## $ npm i -g configure-tailwind
+#### // it is CLI Base so need to install Globally
+
+
+Generate MVC Base Schema File Structure:
+
+### How to Use in Terminal:
+```js
+// Create Tailwind Configure React App.
+createtailwind react-app
+
+// Create Tailwind Configure React App.
+createtailwind next-app
+
+// // Create Tailwind Configure React App.
+// createtailwind remix-app
+
+```
+
+## Go Through the Already Build Templates
+
+**configure-tailwind** is released under the [MIT license](https://github.com/shaantanu9/configure-tailwind/blob/main/LICENSE) & supports modern environments.
+#### Please Star the [Repo](https://github.com/shaantanu9/configure-tailwind) on GitHub and Share with Other Fellow Developers
+
+## Installation
+
+Using npm:
+```shell
+$ npm i -g configure-tailwind
+// it is CLI Base so need to install Globally
+
+$ npm i configure-tailwind
+```
+Note: add `--save` if you are using npm < 5.0.0
+
+
+
+Bore Configuring Tailwind for React App, or any other Framework Try this Package Once.
+
+## Why configure-tailwind?
+
+Programming is all About simplifying and Automating Stuff
+
+### Then Why Build Same BoilerPlate Again and Again
+
+
+Use this Package and (getAwayFromThePain) create Express+Mongoose BoilerPlate
+ * Get Read of Wrting and Creating Same Thing
+ * Directly Start Working on the real Logic
+ * Reduce time of Development by atleast 10%
+
+### Please Contribute Models and Controllers
+
+#### Become a [Open Source Contributer](https://github.com/shaantanu9/configure-tailwind)
+We **configure-tailwind** wants to help Each and Every Programmer Writing real Logical code, without **wasting time** of Generating the MVC Schema.
+
+So We are Here to Add as much as Models and Controllers and Other important files as Possible
+
+### How can You Support and Help others?
+
+If you have written any **unique schema**, Add that to this list, How?Simple
+
+ * Go the [Github Repo](https://github.com/shaantanu9/configure-tailwind)
+ * Fork that Repo
+ * Clone and Download it and Add the File in given manner.
+ * Add the Changes and push to your account.
+ * Upload in your Repo => Pull Request and Done
+
+
+ ## Licence
+ MIT
+
+ #### I love to work with Open Source Projects
+ #### Contact Me [Twitter](https://twitter.com/ShantanuMali9) [Linkedin](https://www.linkedin.com/in/shantanu-bombatkar)
+
+ ## Keywords
diff --git a/CLI-Tools-MERN-Stack-beginners/express-schema-generator/commands/addMnC.command.js b/CLI-Tools-MERN-Stack-beginners/express-schema-generator/commands/addMnC.command.js
new file mode 100644
index 00000000..14ed1046
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/express-schema-generator/commands/addMnC.command.js
@@ -0,0 +1,49 @@
+const axios = require("axios");
+
+const createRespectiveMnC = (fileName, modelData, controllerData) => {
+ const fs = require("fs");
+ const shell = require("shelljs");
+ // console.log(shell.exec('pwd')) // see where we are at the current working time
+ shell.touch([
+ `src/models/${fileName}.model.js`,
+ `src/controllers/${fileName}.controller.js`,
+ ]);
+ fs.writeFile(`src/models/${fileName}.model.js`, modelData, (err, data) => {
+ catchErr(err, "writingModelFile");
+ });
+ fs.writeFile(
+ `src/controllers/${fileName}.controller.js`,
+ controllerData,
+ (err, data) => {
+ catchErr(err, "writeControllerFile");
+ }
+ );
+};
+
+async function getFullCode(modelArr) {
+ try {
+ // console.log(modelArr,"modelArr")
+
+ for (var i in modelArr) {
+ url = `https://express-schema.netlify.app/samples/models/${modelArr[i]}.model.js`;
+ const modelResponse = await axios.get(url);
+ modelData = modelResponse.data;
+
+ url = `https://express-schema.netlify.app/samples/controllers/${modelArr[i]}.controller.js`;
+ const contollerResponse = await axios.get(url);
+ controllerData = contollerResponse.data;
+
+ createRespectiveMnC(modelArr[i], modelData, controllerData);
+ }
+ } catch (error) {
+ catchErr(error);
+ }
+}
+
+function catchErr(err = "noError", funcName) {
+ if (err !== null) console.log(`error from ${funcName}`, err);
+}
+
+module.exports = (modelArr) => {
+ getFullCode(modelArr);
+};
diff --git a/CLI-Tools-MERN-Stack-beginners/express-schema-generator/commands/addMnCk.js b/CLI-Tools-MERN-Stack-beginners/express-schema-generator/commands/addMnCk.js
new file mode 100644
index 00000000..3c70f7a8
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/express-schema-generator/commands/addMnCk.js
@@ -0,0 +1,48 @@
+const axios = require("axios");
+
+const createRespectiveMnC = (fileName, modelData, controllerData) => {
+ const fs = require("fs");
+ const shell = require("shelljs");
+ // console.log(shell.exec('pwd')) // see where we are at the current working time
+ shell.touch([
+ `src/models/${fileName}.model.js`,
+ `src/controllers/${fileName}.controller.js`,
+ ]);
+ fs.writeFile(`src/models/${fileName}.model.js`, modelData, (err, data) => {
+ catchErr(err, "writingModelFile");
+ });
+ fs.writeFile(
+ `src/controllers/${fileName}.controller.js`,
+ constollerData,
+ (err, data) => {
+ catchErr(err, "writeControllerFile");
+ }
+ );
+};
+
+async function getUser(modelArr) {
+ try {
+ // console.log(modelArr,"modelArr")
+
+ for (var i in modelArr) {
+ url = `https://express-schema.netlify.app/samples/models/${modelArr[i]}.model.js`;
+ const modelResponse = await axios.get(url);
+ modelData = modelResponse.data;
+
+ url = `https://express-schema.netlify.app/samples/controllers/${modelArr[i]}.controller.js`;
+ const contollerResponse = await axios.get(url);
+ controllerData = contollerResponse.data;
+ createRespectiveMnC(modelArr[i], modelData, controllerData);
+ }
+ } catch (error) {
+ catchErr(error);
+ }
+}
+
+function catchErr(err = "noError", funcName) {
+ if (err !== null) console.log(`error from ${funcName}`, err);
+}
+
+module.exports = (modelArr) => {
+ getUser(modelArr);
+};
diff --git a/CLI-Tools-MERN-Stack-beginners/express-schema-generator/commands/create.command.js b/CLI-Tools-MERN-Stack-beginners/express-schema-generator/commands/create.command.js
new file mode 100644
index 00000000..5d20bb35
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/express-schema-generator/commands/create.command.js
@@ -0,0 +1,113 @@
+var shell = require("shelljs");
+const path = require("path");
+const fs = require("fs");
+
+const editPackageJson = async (folderName) => {
+ const packageJsonPath = await path.join(
+ "" + shell.exec("pwd"),
+ "..",
+ "" + folderName,
+ "./package.json"
+ );
+ // const packageJsonPath = await path.join(__dirname,"..",""+folderName,'./package.json')
+ let editPackageJson = require(packageJsonPath);
+ editPackageJson.scripts.server = "nodemon src/index";
+ editPackageJson.scripts.start = "node src/index";
+ editPackageJson.scripts.test = "jest --coverage";
+ editPackageJson.dependencies.multer = "^1.4.5-lts.1";
+
+ editPackageJson = JSON.stringify(editPackageJson, undefined, "\t");
+ fs.writeFileSync(packageJsonPath, editPackageJson, (err, data) => {
+ catchErr(err, "writingModelFile");
+ });
+};
+
+const installPackages = async (folderName) => {
+ shell.cd(folderName);
+ // createGitIgnoreNEnv(folderName);
+ shell.exec("npm init -y");
+ editPackageJson(folderName);
+ shell.exec("npm install");
+ shell.exec("npm i express mongoose multer");
+};
+
+const createFolderSchema = (folderName) => {
+ const projectExist = require("./projectExist");
+ projectExist(folderName);
+ // shell.exit();
+ // try{
+ // shell.find('node_modules')
+ // }catch(e) {catchErr(e,"Folder / Project With Same name already exists")}
+
+ shell.exec(`mkdir ${folderName}`);
+ installPackages(folderName);
+
+ shell.exec(`mkdir src`);
+ shell.cd(`src`);
+ shell.mkdir("-p", [
+ "models",
+ "controllers",
+ "configs",
+ "middlewares",
+ "uploads",
+ ]);
+
+ shell.touch([
+ "index.js",
+ "models/user.model.js",
+ "controllers/user.controller.js",
+ "controllers/crud.controller.js",
+ "configs/db.js",
+ "middlewares/file-uploads.js",
+ "middlewares/authenticate.js",
+ ]);
+ createExpressServer();
+ createExpressServer(".env");
+ createExpressServer(".gitignore");
+ // createExpressServer('configs/db.js')
+ createExpressServer("configs/db.js");
+ createExpressServer("controllers/crud.controller.js");
+ createExpressServer("controllers/user.controller.js");
+ createExpressServer("models/user.model.js");
+ createExpressServer("middlewares/file-uploads.js");
+};
+
+async function createExpressServer(fileName = "index.js") {
+ try {
+ const axios = require("axios");
+
+ url = `https://express-schema.netlify.app/samples/${fileName}`;
+
+ // for .env and .gitignore
+ if (fileName.includes(".") && !fileName.includes(".js")) {
+ url = `https://express-schema.netlify.app/samples/${
+ fileName.split(".")[1]
+ }`;
+ }
+
+ const indexResponse = await axios.get(url);
+ indexData = indexResponse.data;
+ const fs = require("fs");
+ fs.writeFile(`${fileName}`, indexData, (err, data) => {
+ catchErr(err, `Writing in ${fileName} CreatingExpressServer`);
+ });
+ } catch (err) {
+ catchErr(err, "CreatingExpressServer Whole");
+ }
+
+ if (fileName.includes(".") && !fileName.includes(".js")) {
+ try {
+ shell.mv(fileName, "../");
+ } catch (e) {
+ catchErr(e, "while Moving file ENV and gitignore");
+ }
+ }
+}
+
+function catchErr(err = "noError", funcName) {
+ if (err !== null) {
+ console.log(`error from ${funcName}`, err);
+ }
+}
+
+module.exports = createFolderSchema;
diff --git a/CLI-Tools-MERN-Stack-beginners/express-schema-generator/commands/fileExist.js b/CLI-Tools-MERN-Stack-beginners/express-schema-generator/commands/fileExist.js
new file mode 100644
index 00000000..aa902b89
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/express-schema-generator/commands/fileExist.js
@@ -0,0 +1,24 @@
+const fs = require("fs");
+const shell = require("shelljs");
+fileExistBoolean = (fileName) => {
+ fs.readdir(`src/${fileName}`, (err, data) => {
+ if (err) {
+ console.log(`Error: Wrong Path not found **${fileName}** Directory
+Please Go inside the Project that You created using
+
+||| create-express-schema |||
+use >>> cd <<< to Go inside your Project Folder
+
+use >>> ls <<< to check there is controllers and models Directories
+ `);
+ console.log(err.message);
+ shell.exit();
+ }
+
+ // console.log(true, "file Exist Move On")
+ // return true;
+ });
+ return true;
+};
+
+module.exports = fileExistBoolean;
diff --git a/CLI-Tools-MERN-Stack-beginners/express-schema-generator/commands/projectExist.js b/CLI-Tools-MERN-Stack-beginners/express-schema-generator/commands/projectExist.js
new file mode 100644
index 00000000..2f71ed04
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/express-schema-generator/commands/projectExist.js
@@ -0,0 +1,15 @@
+const fs = require("fs");
+
+projectExist = (path) => {
+ try {
+ if (fs.existsSync(`./${path}`)) {
+ //file exists
+ console.log(" Sorry Same Name File Already Exist, Try Another Name");
+ shell.exit();
+ }
+ } catch (err) {
+ console.error("err");
+ }
+};
+
+module.exports = projectExist;
diff --git a/CLI-Tools-MERN-Stack-beginners/express-schema-generator/commands/welcome.js b/CLI-Tools-MERN-Stack-beginners/express-schema-generator/commands/welcome.js
new file mode 100644
index 00000000..d481eb19
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/express-schema-generator/commands/welcome.js
@@ -0,0 +1,14 @@
+const welcome = require("@tos_/cli-welcome");
+
+const packageJson = require("../package.json");
+
+// OR with all the options set like this:
+module.exports = welcome({
+ title: `${packageJson.name}`,
+ tagLine: `by ${packageJson.author.name} ${packageJson.author.url}`,
+ bgColor: `#FADC00`,
+ color: `#FFFFFF`,
+ bold: true,
+ clear: true,
+ version: `${packageJson.version}`,
+});
diff --git a/CLI-Tools-MERN-Stack-beginners/express-schema-generator/index.js b/CLI-Tools-MERN-Stack-beginners/express-schema-generator/index.js
new file mode 100755
index 00000000..49b64eb4
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/express-schema-generator/index.js
@@ -0,0 +1,58 @@
+#!/usr/bin/env node
+
+var shell = require("shelljs");
+const path = require("path");
+const fs = require("fs");
+
+const { Command } = require("commander");
+const program = new Command();
+
+const welcome = require("./commands/welcome");
+
+program
+ .command("create")
+ .argument("", "project name")
+ .description("Create Folder Schema except models and Controllers")
+ .action(function () {
+ if (this.args.length !== 0) {
+ const createFolderSchema = require("./commands/create.command");
+ createFolderSchema(this.args);
+ } else {
+ console.log("Please Provide the Project Name");
+ shell.exit();
+ }
+ });
+
+program
+ .command("add")
+ .argument("", "model names with space")
+ .description(
+ `After cd in run this command
+this create model and controller and add in respected folder
+for more https://github.com/shaantanu9/expressSchema
+ `
+ )
+ .action(function () {
+ const fileExist = require("./commands/fileExist");
+
+ let controllerExist = fileExist("controllers").fileExistBoolean;
+ let modelExist = fileExist("models").fileExistBoolean;
+
+ const addMnCCommand = require("./commands/addMnC.command");
+
+ if (this.args.length !== 0) {
+ addMnCCommand(this.args);
+ } else {
+ console.log("Please Provide the Model Name to clone");
+ }
+ });
+
+program
+ .command("delete")
+ .argument("", "project name to delete")
+ .description(` delete the project in Seconds`)
+ .action(function () {
+ shell.exec(`rm -rf ${this.args}`);
+ });
+
+program.parse();
diff --git a/CLI-Tools-MERN-Stack-beginners/express-schema-generator/package.json b/CLI-Tools-MERN-Stack-beginners/express-schema-generator/package.json
new file mode 100644
index 00000000..6a81bf14
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/express-schema-generator/package.json
@@ -0,0 +1,39 @@
+{
+ "name": "express-schema-generator",
+ "version": "1.0.8",
+ "description": "This Package Create Express+Mongoose Schema BoilerPlate",
+ "main": "index.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1",
+ "server": "nodemon src/index"
+ },
+ "keywords": [
+ "express-schema-generator",
+ "express-mongoose-boilerplate",
+ "mongoose-boilerplate",
+ "mvc express schema",
+ "express-schema",
+ "create-express-server",
+ "create-express-Schema",
+ "create-mongoose-server"
+ ],
+ "author": {
+ "name": "Shantanu Bombatkar",
+ "email": "shodkkshantanu@gmail.com",
+ "url": "https://github.com/shaantanu9"
+ },
+ "files": [
+ "commands/*",
+ "index.js"
+ ],
+ "bin": {
+ "create-express-schema": "index.js"
+ },
+ "license": "MIT",
+ "dependencies": {
+ "@tos_/cli-welcome": "^1.0.2",
+ "axios": "^0.25.0",
+ "commander": "^9.0.0",
+ "shelljs": "^0.8.5"
+ }
+}
diff --git a/CLI-Tools-MERN-Stack-beginners/express-schema-generator/readme.md b/CLI-Tools-MERN-Stack-beginners/express-schema-generator/readme.md
new file mode 100644
index 00000000..a10409ef
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/express-schema-generator/readme.md
@@ -0,0 +1,108 @@
+# express-schema-generator
+
+[Site](https://express-schema.netlify.app/) |
+[Docs](https://express-schema.netlify.app/docs) |
+[Contributing](https://github.com/shaantanu9/express-schema-generator) |
+[Code of Conduct](https://code-of-conduct.openjsf.org) |
+[Twitter](https://twitter.com/ShantanuMali9) |
+[Chat](https://gitter.im/shaantanu9)
+
+### Bored Writing and Creating the Same Express MVC Folders Again and Again Here we Go
+
+The [express-schema-genrator](https://express-schema.netlify.app/) is a simple Fast CLI that create Express+Mongoose MVC pattern.
+
+## $ npm i -g express-schema-generator
+
+#### // it is CLI Base so need to install Globally
+
+Generate MVC Base Schema File Structure:
+
+### How to Use in Terminal:
+
+```js
+// Create the Whole Basic Express Schema.
+create-express-schema create
+
+// is Same as File Name
+
+// To Download Models and Controllers
+
+cd
+
+// Now To Download Models and Controllers
+
+create-express-schema add
+
+```
+
+## Go Through the Schema Model Selects Through 100+ Schema
+
+- [Models List](https://github.com/shaantanu9/express-schema-generator/tree/main/samples/models)
+- [Controllers List](https://github.com/shaantanu9/express-schema-generator/tree/main/samples/contollers)
+- [MiddleWares List](https://github.com/shaantanu9/express-schema-generator/tree/main/samples/middleware)
+- [Authentication List](https://github.com/shaantanu9/express-schema-generator/tree/main/samples/authentication)
+
+**express-schema-generator** is released under the [MIT license](https://raw.githubusercontent.com/lodash/lodash/4.17.10-npm/LICENSE) & supports modern environments.
+
+#### Please Star the [Repo](https://github.com/shaantanu9/express-schema-generator) on GitHub and Share with Other Fellow Developers
+
+## Installation
+
+Using npm:
+
+```shell
+$ npm i -g express-schema-generator
+// it is CLI Base so need to install Globally
+
+$ npm i express-schema-generator
+```
+
+Note: add `--save` if you are using npm < 5.0.0
+
+Bore Writing and Creating the Same Express MVC Folders Again and Again Here we Go .
+
+## Why Express-Schema-Generator?
+
+Programming is all About simplifying and Automating Stuff
+
+### Then Why Build Same BoilerPlate Again and Again
+
+Use this Package and (getAwayFromThePain) create Express+Mongoose BoilerPlate
+
+- Get Read of Wrting and Creating Same Thing
+- Choose from +100 Models and Controllers
+- Directly Start Working on the real Logic
+- Reduce time of Development by atleast 10%
+
+### Please Contribute Models and Controllers
+
+#### Become a [Open Source Contributer](https://github.com/shaantanu9/express-schema-generator)
+
+We **express-schema-generator** wants to help Each and Every Programmer Writing real Logical code, without **wasting time** of Generating the MVC Schema.
+
+So We are Here to Add as much as Models and Controllers and Other important files as Possible
+
+### How can You Support and Help others?
+
+If you have written any **unique schema**, Add that to this list, How?Simple
+
+- Go the [Github Repo](https://github.com/shaantanu9/express-schema-generator)
+- Fork that Repo => Add the [Model](https://github.com/shaantanu9/express-schema-generator/tree/main/samples/models) and [Contoller](https://github.com/shaantanu9/express-schema-generator/tree/main/samples/Contollers) in [Samples](https://github.com/shaantanu9/express-schema-generator/tree/main/samples)
+- Clone and Download it and Add the File in given manner.
+- Name of the Model Need to be **Unique** and **Self explainatory**
+- Upload in your Repo => Pull Request and Done
+
+## Licence
+
+MIT
+
+#### I love to work with Open Source Projects
+
+#### Contact Me [Twitter](https://twitter.com/ShantanuMali9) [Linkedin](https://www.linkedin.com/in/shantanu-bombatkar)
+
+## Keywords
+
+[express-schema-generator](https://www.npmjs.com/search?q=keywords:express-schema-generator) [express-mongoose-boilerplate](https://www.npmjs.com/search?q=keywords:express-mongoose-boilerplate) [mongoose-boilerplate](https://www.npmjs.com/search?q=keywords:mongoose-boilerplate) [mvc express schema](https://www.npmjs.com/search?q=keywords:mvc-express-schema) [](https://www.npmjs.com/search?q=keywords:) [express-schema](https://www.npmjs.com/search?q=keywords:express-schema)
+[create-express-server](https://www.npmjs.com/search?q=keywords:create-express-server)
+[create-express-Schema](https://www.npmjs.com/search?q=keywords:create-mongoose-schema)
+[create-mongoose-server](https://www.npmjs.com/search?q=keywords:create-mongoose-server)
diff --git a/CLI-Tools-MERN-Stack-beginners/sirdeploy/.gitignore b/CLI-Tools-MERN-Stack-beginners/sirdeploy/.gitignore
new file mode 100644
index 00000000..e5af5fa1
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/sirdeploy/.gitignore
@@ -0,0 +1,61 @@
+node_modules
+newEdit
+.DS_Store
+.dart_tool/
+.packages
+build/
+pubspec.lock
+
+doc/api/
+
+.env*
+
+*.dart.js
+*.info.json # Produced by the --dump-info flag.
+*.js # When generated by dart2js. Don't specify *.js if your
+ # project includes source files written in JavaScript.
+*.js_
+*.js.deps
+*.js.map
+
+.flutter-plugins
+.flutter-plugins-dependencies
+
+.pnp.*
+.yarn/*
+!.yarn/patches
+!.yarn/plugins
+!.yarn/releases
+!.yarn/sdks
+!.yarn/versions
+
+.yarn/*
+!.yarn/cache
+!.yarn/patches
+!.yarn/plugins
+!.yarn/releases
+!.yarn/sdks
+!.yarn/versions
+
+*.class
+
+*.log
+
+*.ctxt
+
+.mtj.tmp/
+
+*.jar
+*.war
+*.nar
+*.ear
+*.zip
+*.tar.gz
+*.rar
+
+hs_err_pid*
+replay_pid*
+
+/coverage
+/build
+npm-debug.log*
\ No newline at end of file
diff --git a/CLI-Tools-MERN-Stack-beginners/sirdeploy/commands/createFakeServer.command.js b/CLI-Tools-MERN-Stack-beginners/sirdeploy/commands/createFakeServer.command.js
new file mode 100644
index 00000000..9919d82b
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/sirdeploy/commands/createFakeServer.command.js
@@ -0,0 +1,52 @@
+const shell = require("shelljs");
+const path = require("path");
+const fs = require("fs");
+const details = require("./details.json");
+// console.log(details.reactApp.appJsData.join("\n"))
+
+const createIndexFile = () => {
+ shell.exec("touch index.js");
+ indexFileData = details.indexCode.join("\n");
+ fs.writeFileSync("index.js", indexFileData);
+};
+
+// function to edit package json file
+const editPackageJson = () => {
+ // create .gitignore file
+ shell.exec("touch .gitignore");
+ fs.writeFileSync(".gitignore", "node_modules");
+
+ const packageJson = require(shell.pwd() + "/package.json");
+ packageJson.scripts.start = "node index.js";
+ packageJson.scripts.deploy = "heroku create";
+ packageJson.scripts.updatedeploy =
+ "git add . && git commit -m 'updated' && git push heroku master";
+
+ fs.writeFileSync("package.json", JSON.stringify(packageJson));
+};
+
+const configureJsonServer = () => {
+ shell.exec("npm init -y");
+
+ shell.exec("npm install json-server");
+ shell.exec("npm i --location=global heroku");
+ editPackageJson();
+ createIndexFile();
+};
+
+const createFakeServer = (name) => {
+ const projectExist = require("./projectExist");
+ if (projectExist(name) !== true) {
+ shell.exit();
+ }
+
+ try {
+ shell.cd(name);
+ configureJsonServer();
+ } catch (err) {
+ console.log(err.message);
+ shell.exit();
+ }
+};
+
+module.exports = createFakeServer;
diff --git a/CLI-Tools-MERN-Stack-beginners/sirdeploy/commands/createFakeServerHeroku.command.js b/CLI-Tools-MERN-Stack-beginners/sirdeploy/commands/createFakeServerHeroku.command.js
new file mode 100644
index 00000000..b5a3fd3b
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/sirdeploy/commands/createFakeServerHeroku.command.js
@@ -0,0 +1,62 @@
+const shell = require("shelljs");
+const path = require("path");
+const fs = require("fs");
+const details = require("./details.json");
+// console.log(details.reactApp.appJsData.join("\n"))
+
+const herokuDeploy = () => {
+ shell.exec("git init");
+ shell.exec("git add .");
+ shell.exec("git commit -m 'deploy'");
+ shell.exec("heroku create");
+ shell.exec("git push heroku master");
+};
+
+const createIndexFile = () => {
+ shell.exec("touch index.js");
+ indexFileData = details.indexCode.join("\n");
+ fs.writeFileSync("index.js", indexFileData);
+ herokuDeploy();
+};
+
+// function to edit package json file
+const editPackageJson = () => {
+ // create .gitignore file
+ shell.exec("touch .gitignore");
+ fs.writeFileSync(".gitignore", "node_modules");
+
+ const packageJson = require(shell.pwd() + "/package.json");
+ packageJson.scripts.start = "node index.js";
+ packageJson.scripts.deploy = "heroku create";
+ packageJson.scripts.updatedeploy =
+ "git add . && git commit -m 'updated' && git push heroku master";
+
+ fs.writeFileSync("package.json", JSON.stringify(packageJson));
+};
+
+const configureJsonServer = () => {
+ shell.exec("npm init -y");
+
+ shell.exec("npm install json-server");
+ shell.exec("npm i --location=global heroku");
+ editPackageJson();
+ createIndexFile();
+};
+
+const createFakeServer = (name) => {
+ const projectExist = require("./projectExist");
+ if (projectExist(name) !== true) {
+ shell.exit();
+ }
+
+ try {
+ // shell.exec(`npx create-react-app ${name} --template redux`);
+ shell.cd(name);
+ configureJsonServer();
+ } catch (err) {
+ console.log(err.message);
+ shell.exit();
+ }
+};
+
+module.exports = createFakeServer;
diff --git a/CLI-Tools-MERN-Stack-beginners/sirdeploy/commands/createReactApp.command.js b/CLI-Tools-MERN-Stack-beginners/sirdeploy/commands/createReactApp.command.js
new file mode 100644
index 00000000..bbbbdb2c
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/sirdeploy/commands/createReactApp.command.js
@@ -0,0 +1,47 @@
+const shell = require("shelljs");
+const path = require("path");
+const fs = require("fs");
+const details = require("./details.json");
+// console.log(details.reactApp.appJsData.join("\n"))
+
+const herokuDeploy = () => {
+ shell.exec("git init");
+ shell.exec("git add .");
+ shell.exec("git commit -m 'deploing React App'");
+ shell.exec("npx heroku create");
+ shell.exec("git push heroku master");
+};
+
+// function to edit package json file
+const editPackageJson = () => {
+ const packageJson = require(shell.pwd() + "/package.json"); // package.json file is located in root directory
+ packageJson.scripts.sirdeploy = "npx sirdeploy";
+ packageJson.scripts.updatedeploy = "git add . && git commit -m 'updated' && git push heroku master";
+ fs.writeFileSync(
+ "./package.json",
+ JSON.stringify(packageJson, null, 2), // null, 2 is for indentation
+ "utf8", // utf8 is for encoding
+ (err) => {
+ if (err) throw err;
+ console.log("The file has been saved!");
+ }
+ );
+};
+
+const installingHeroku = () => {
+ // shell.exec("npm i --location=global heroku");
+ editPackageJson();
+ herokuDeploy();
+};
+
+const createReactApp = (name) => {
+ if (name.length == 1 && name[0] !== ".") {
+ console.log(
+ "You should be at root directory where the Package.json file is located\n\nAnd you should write 'heroku-react-app .' this DOT is important"
+ );
+ shell.exit();
+ }
+ installingHeroku();
+};
+
+module.exports = createReactApp;
diff --git a/CLI-Tools-MERN-Stack-beginners/sirdeploy/commands/details.json b/CLI-Tools-MERN-Stack-beginners/sirdeploy/commands/details.json
new file mode 100644
index 00000000..e01cd535
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/sirdeploy/commands/details.json
@@ -0,0 +1,15 @@
+{
+ "indexCode":[
+ "const data = require('./db.json');",
+"",
+"const jsonServer = require('json-server');",
+"const server = jsonServer.create();",
+"const router = jsonServer.router(data);",
+"const middlewares = jsonServer.defaults();",
+"const port = process.env.PORT || 3000;",
+"",
+"server.use(middlewares);",
+"server.use(router);",
+"server.listen(port, () => console.log(`JSON Server is running on port ${port}`));"
+ ]
+}
\ No newline at end of file
diff --git a/CLI-Tools-MERN-Stack-beginners/sirdeploy/commands/github.command.js b/CLI-Tools-MERN-Stack-beginners/sirdeploy/commands/github.command.js
new file mode 100644
index 00000000..d50c7dc4
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/sirdeploy/commands/github.command.js
@@ -0,0 +1,20 @@
+const shell = require("shelljs");
+const path = require("path");
+const fs = require("fs");
+
+const pushAppOnGithub = (name) => {
+ if (name[0] === "." && name.length === 1) {
+//Get Current Time and date and store it in a variable
+ const currentTime = new Date().toLocaleString();
+ name = `AutoDeploy-${currentTime}`;
+ }else{name = name.join(" ")}
+
+ const gitAdd = `git add .`;
+ const gitCommit = `git commit -m "${name}"`;
+ const gitPush = `git push origin main`;
+ shell.exec(gitAdd);
+ shell.exec(gitCommit);
+ shell.exec(gitPush);
+};
+
+module.exports = pushAppOnGithub;
diff --git a/CLI-Tools-MERN-Stack-beginners/sirdeploy/commands/gitignore.command.js b/CLI-Tools-MERN-Stack-beginners/sirdeploy/commands/gitignore.command.js
new file mode 100644
index 00000000..40d82449
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/sirdeploy/commands/gitignore.command.js
@@ -0,0 +1,35 @@
+const shell = require("shelljs");
+const path = require("path");
+const fs = require("fs");
+
+const fetchFunction = async (name) => {
+ require("https").get(
+ `https://github.com/shaantanu9/SirDeploy/blob/main/newEdit/${name}.gitignore`,
+ (res) => {
+ res.setEncoding("utf8");
+ // console.log(res.statusCode);
+ res.on("data", function (body) {
+ console.log(body);
+ });
+ }
+ );
+};
+
+const getGitIgnoreFile = (name) => {
+ // fetch data from github repo
+ let data = fetchFunction(name);
+ return data;
+};
+
+const createGitignore = (name) => {
+ fullData = [];
+ name.forEach((name) => {
+ data = getGitIgnoreFile(name);
+ fullData.push(data);
+ }),
+ fs.writeFileSync(".gitignore", fullData.join("\n"));
+};
+
+createGitignore(["1c"]);
+
+module.exports = createGitignore;
diff --git a/CLI-Tools-MERN-Stack-beginners/sirdeploy/commands/projectExist.js b/CLI-Tools-MERN-Stack-beginners/sirdeploy/commands/projectExist.js
new file mode 100644
index 00000000..1754abb1
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/sirdeploy/commands/projectExist.js
@@ -0,0 +1,18 @@
+const fs = require("fs");
+
+projectExist = (path) => {
+ try {
+ if (fs.existsSync(`./${path}`)) {
+ //file exists
+ console.log(
+ " Sorry the File with this name not exist, Please Create 1 file First then paste your db.json file inside and try Again "
+ );
+ return true;
+ // shell.exit()
+ }
+ } catch (err) {
+ console.error("err");
+ }
+};
+
+module.exports = projectExist;
diff --git a/CLI-Tools-MERN-Stack-beginners/sirdeploy/commands/reactapp.command.js b/CLI-Tools-MERN-Stack-beginners/sirdeploy/commands/reactapp.command.js
new file mode 100644
index 00000000..49080a55
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/sirdeploy/commands/reactapp.command.js
@@ -0,0 +1,79 @@
+const shell = require("shelljs");
+const path = require("path");
+const fs = require("fs");
+const details = require("./details.json");
+
+const deployReactApp = () => {
+ const gitCommand = `npm run deploy -- -m "React App Deploy using SirDeploy Package"`;
+ shell.exec(gitCommand);
+ const welcome = require("./welcome");
+};
+
+const addRemote = (username, repoName) => {
+ const gitCommand = `git remote add origin https://github.com/${username}/${repoName}.git`;
+ try {
+ shell.exec(gitCommand);
+ } catch (err) {
+ null;
+ }
+ deployReactApp();
+};
+
+const editPackageJson = (homePageURL, repoName, username) => {
+ const packageJson = require(shell.pwd() + "/package.json");
+ packageJson.homepage = homePageURL;
+ packageJson.scripts.predeploy = "npm run build";
+ packageJson.scripts.deploy = "gh-pages -d build";
+ fs.writeFileSync(
+ "package.json",
+ JSON.stringify(packageJson, null,2),
+ "utf8",
+ null,
+ 4
+ );
+ addRemote(username, repoName);
+};
+
+const createHomePageURL = (username, repoName) => {
+ const homePageURL = `https://${username}.github.io/${repoName}`;
+ shell.exec(`npm install --location=global gh-pages --save-dev`);
+ editPackageJson(homePageURL, repoName, username);
+};
+
+const findGithubRepo = () => {
+ // get the git url using git remote -v and store it in a variable
+ const gitUrl = shell.exec("git remote -v", {
+ silent: true,
+ }).stdout;
+ // split the git url and store it in an array and get the link from the array
+ if(!gitUrl.length){console.log("No remote repository found\nCreate a remote repository and try again");shell.exit()}
+ const gitUrlArray = gitUrl.split("\n");
+ const [username, repoName] = gitUrlArray[0]
+ .split(" ")[0]
+ .split("origin\thttps://github.com/")[1]
+ .split(".git")[0]
+ .split("/");
+ console.log(username, repoName);
+ createHomePageURL(username, repoName);
+};
+
+const reactAppOnGithub = async (name) => {
+ // if not root directory then exit
+ console.log(name[0]);
+ if (name[0] !== ".") return;
+ try {
+ const packageJson = require(shell.pwd() + "/package.json");
+ // check if the project is react app or not
+ if (packageJson.dependencies.react !== undefined) {
+ findGithubRepo();
+ } else {
+ console.log("Sorry this is not a react app");
+ shell.exit();
+ }
+ } catch (err) {
+ console.log(err.message);
+ shell.exit();
+ }
+};
+// reactAppOnGithub(".");
+module.exports = reactAppOnGithub;
diff --git a/CLI-Tools-MERN-Stack-beginners/sirdeploy/commands/updatefakeServer.command.js b/CLI-Tools-MERN-Stack-beginners/sirdeploy/commands/updatefakeServer.command.js
new file mode 100644
index 00000000..238ba90e
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/sirdeploy/commands/updatefakeServer.command.js
@@ -0,0 +1,19 @@
+const shell = require("shelljs");
+
+const updateFakeServer = ([name, msg]) => {
+ const projectExist = require("./projectExist");
+ if (projectExist(name) !== true || msg == undefined) {
+ console.log("Project Not Exist or Commit Message is not provided");
+ shell.exit();
+ }
+ try {
+ shell.cd(name);
+ shell.exec(
+ `git add . && git commit -m '${msg} || updated @ ${new Date()}' && git push heroku master`
+ );
+ } catch (err) {
+ console.log(err.message);
+ shell.exit();
+ }
+};
+export default updateFakeServer;
diff --git a/CLI-Tools-MERN-Stack-beginners/sirdeploy/commands/welcome.js b/CLI-Tools-MERN-Stack-beginners/sirdeploy/commands/welcome.js
new file mode 100644
index 00000000..d481eb19
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/sirdeploy/commands/welcome.js
@@ -0,0 +1,14 @@
+const welcome = require("@tos_/cli-welcome");
+
+const packageJson = require("../package.json");
+
+// OR with all the options set like this:
+module.exports = welcome({
+ title: `${packageJson.name}`,
+ tagLine: `by ${packageJson.author.name} ${packageJson.author.url}`,
+ bgColor: `#FADC00`,
+ color: `#FFFFFF`,
+ bold: true,
+ clear: true,
+ version: `${packageJson.version}`,
+});
diff --git a/CLI-Tools-MERN-Stack-beginners/sirdeploy/index.js b/CLI-Tools-MERN-Stack-beginners/sirdeploy/index.js
new file mode 100755
index 00000000..eb587688
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/sirdeploy/index.js
@@ -0,0 +1,120 @@
+#!/usr/bin/env node
+
+var shell = require("shelljs");
+const path = require("path");
+const fs = require("fs");
+
+const { Command } = require("commander");
+const program = new Command();
+
+const welcome = require("./commands/welcome");
+
+program
+ .command("delete")
+ .argument("", "project name to delete")
+ .description(` delete the project in Seconds`)
+ .action(function () {
+ shell.exec(`rm -rf ${this.args}`);
+ });
+
+// create the tailwind Configure ReactJs App
+
+program
+ .command("create-fakeserver")
+ .argument("", "File name to create the server")
+ .description(`Create Fake Server and Deploy it on Heroku`)
+ .action(function () {
+ if (this.args.length !== 0) {
+ const createFakeServer = require("./commands/createfakeServer.command");
+ createFakeServer(this.args);
+ } else {
+ console.log("Please Provide the Project Name");
+ shell.exit();
+ }
+ });
+
+program
+ .command("heroku-fakeserver")
+ .argument("", "File name to create the server")
+ .description(`Create Fake Server and Deploy it on Heroku`)
+ .action(function () {
+ if (this.args.length !== 0) {
+ const createFakeServer = require("./commands/createfakeServerHeroku.command");
+ createFakeServer(this.args);
+ } else {
+ console.log("Please Provide the Project Name");
+ shell.exit();
+ }
+ });
+
+program
+ .command("heroku-react-app")
+ .argument("", "Root Folder Name of ReactJs App that need to deploy")
+ .description(`Deploy ReactApp it on Heroku`)
+ .action(function () {
+ if (this.args.length !== 0) {
+ const createReactApp = require("./commands/createReactApp.command");
+ createReactApp(this.args);
+ } else {
+ console.log("Please Provide the Project Name");
+ shell.exit();
+ }
+ });
+program
+ .command("reactapp")
+ .argument("", "File name to create the server")
+ .description(`Deploy React App on Github Pages`)
+ .action(function () {
+ if (this.args.length !== 0) {
+ const reactAppOnGithub = require("./commands/reactapp.command");
+ reactAppOnGithub(this.args);
+ } else {
+ console.log("Please Provide the Project Name");
+ shell.exit();
+ }
+ });
+program
+ .command("github")
+ .argument("", "should be . as need to be in root")
+ .description(`Single Command to Push the Code on Github`)
+ .action(function () {
+ if (this.args.length !== 0) {
+ const pushAppOnGithub = require("sirdeploy/commands/github.command.js");
+ pushAppOnGithub(this.args);
+ } else {
+ console.log("Please Provide the Commit Message");
+ shell.exit();
+ }
+ });
+
+program
+ .command("gitignore")
+ .argument(
+ "",
+ "Name the language for which you want to create the gitignore"
+ )
+ .description(`Single Command to Create the Gitignore`)
+ .action(function () {
+ if (this.args.length !== 0) {
+ const createGitignore = require("sirdeploy/commands/gitignore.command.js");
+ createGitignore(this.args);
+ } else {
+ console.log("Please Provide the Commit Message");
+ shell.exit();
+ }
+ });
+program
+ .command("update-heroku-fakeserver")
+ .argument("", "File name to create the server")
+ .description(`Create Fake Server and Deploy it on Heroku`)
+ .action(function () {
+ if (this.args.length !== 0) {
+ const updateFakeServer = require("./commands/updatefakeServer.command");
+ updateFakeServer(this.args);
+ } else {
+ console.log("Please Provide the Project Name");
+ shell.exit();
+ }
+ });
+
+program.parse();
diff --git a/CLI-Tools-MERN-Stack-beginners/sirdeploy/package-lock.json b/CLI-Tools-MERN-Stack-beginners/sirdeploy/package-lock.json
new file mode 100644
index 00000000..142a7f44
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/sirdeploy/package-lock.json
@@ -0,0 +1,1163 @@
+{
+ "name": "sirdeploy",
+ "version": "1.0.12",
+ "lockfileVersion": 2,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "sirdeploy",
+ "version": "1.0.12",
+ "license": "MIT",
+ "dependencies": {
+ "@tos_/cli-welcome": "^1.0.2",
+ "axios": "^0.27.2",
+ "commander": "^9.0.0",
+ "shelljs": "^0.8.5"
+ },
+ "bin": {
+ "deploy": "index.js"
+ },
+ "devDependencies": {
+ "gh-pages": "^4.0.0"
+ }
+ },
+ "node_modules/@tos_/cli-welcome": {
+ "version": "1.0.2",
+ "license": "MIT",
+ "dependencies": {
+ "chalk": "^4.1.2",
+ "clear-any-console": "^1.16.2"
+ }
+ },
+ "node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "license": "MIT",
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/array-union": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz",
+ "integrity": "sha512-Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng==",
+ "dev": true,
+ "dependencies": {
+ "array-uniq": "^1.0.1"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/array-uniq": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz",
+ "integrity": "sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/async": {
+ "version": "2.6.4",
+ "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz",
+ "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==",
+ "dev": true,
+ "dependencies": {
+ "lodash": "^4.17.14"
+ }
+ },
+ "node_modules/asynckit": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
+ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
+ },
+ "node_modules/axios": {
+ "version": "0.27.2",
+ "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz",
+ "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==",
+ "dependencies": {
+ "follow-redirects": "^1.14.9",
+ "form-data": "^4.0.0"
+ }
+ },
+ "node_modules/balanced-match": {
+ "version": "1.0.2",
+ "license": "MIT"
+ },
+ "node_modules/brace-expansion": {
+ "version": "1.1.11",
+ "license": "MIT",
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/chalk": {
+ "version": "4.1.2",
+ "license": "MIT",
+ "dependencies": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
+ "node_modules/clear-any-console": {
+ "version": "1.16.2",
+ "license": "MIT"
+ },
+ "node_modules/color-convert": {
+ "version": "2.0.1",
+ "license": "MIT",
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ }
+ },
+ "node_modules/color-name": {
+ "version": "1.1.4",
+ "license": "MIT"
+ },
+ "node_modules/combined-stream": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
+ "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
+ "dependencies": {
+ "delayed-stream": "~1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/commander": {
+ "version": "9.4.0",
+ "license": "MIT",
+ "engines": {
+ "node": "^12.20.0 || >=14"
+ }
+ },
+ "node_modules/commondir": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz",
+ "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==",
+ "dev": true
+ },
+ "node_modules/concat-map": {
+ "version": "0.0.1",
+ "license": "MIT"
+ },
+ "node_modules/delayed-stream": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
+ "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/email-addresses": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/email-addresses/-/email-addresses-3.1.0.tgz",
+ "integrity": "sha512-k0/r7GrWVL32kZlGwfPNgB2Y/mMXVTq/decgLczm/j34whdaspNrZO8CnXPf1laaHxI6ptUlsnAxN+UAPw+fzg==",
+ "dev": true
+ },
+ "node_modules/escape-string-regexp": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+ "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.8.0"
+ }
+ },
+ "node_modules/filename-reserved-regex": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz",
+ "integrity": "sha512-lc1bnsSr4L4Bdif8Xb/qrtokGbq5zlsms/CYH8PP+WtCkGNF65DPiQY8vG3SakEdRn8Dlnm+gW/qWKKjS5sZzQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/filenamify": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/filenamify/-/filenamify-4.3.0.tgz",
+ "integrity": "sha512-hcFKyUG57yWGAzu1CMt/dPzYZuv+jAJUT85bL8mrXvNe6hWj6yEHEc4EdcgiA6Z3oi1/9wXJdZPXF2dZNgwgOg==",
+ "dev": true,
+ "dependencies": {
+ "filename-reserved-regex": "^2.0.0",
+ "strip-outer": "^1.0.1",
+ "trim-repeated": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/find-cache-dir": {
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz",
+ "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==",
+ "dev": true,
+ "dependencies": {
+ "commondir": "^1.0.1",
+ "make-dir": "^3.0.2",
+ "pkg-dir": "^4.1.0"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/avajs/find-cache-dir?sponsor=1"
+ }
+ },
+ "node_modules/find-up": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
+ "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
+ "dev": true,
+ "dependencies": {
+ "locate-path": "^5.0.0",
+ "path-exists": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/follow-redirects": {
+ "version": "1.15.1",
+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz",
+ "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==",
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://github.com/sponsors/RubenVerborgh"
+ }
+ ],
+ "engines": {
+ "node": ">=4.0"
+ },
+ "peerDependenciesMeta": {
+ "debug": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/form-data": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
+ "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
+ "dependencies": {
+ "asynckit": "^0.4.0",
+ "combined-stream": "^1.0.8",
+ "mime-types": "^2.1.12"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/fs-extra": {
+ "version": "8.1.0",
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",
+ "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",
+ "dev": true,
+ "dependencies": {
+ "graceful-fs": "^4.2.0",
+ "jsonfile": "^4.0.0",
+ "universalify": "^0.1.0"
+ },
+ "engines": {
+ "node": ">=6 <7 || >=8"
+ }
+ },
+ "node_modules/fs.realpath": {
+ "version": "1.0.0",
+ "license": "ISC"
+ },
+ "node_modules/function-bind": {
+ "version": "1.1.1",
+ "license": "MIT"
+ },
+ "node_modules/gh-pages": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/gh-pages/-/gh-pages-4.0.0.tgz",
+ "integrity": "sha512-p8S0T3aGJc68MtwOcZusul5qPSNZCalap3NWbhRUZYu1YOdp+EjZ+4kPmRM8h3NNRdqw00yuevRjlkuSzCn7iQ==",
+ "dev": true,
+ "dependencies": {
+ "async": "^2.6.1",
+ "commander": "^2.18.0",
+ "email-addresses": "^3.0.1",
+ "filenamify": "^4.3.0",
+ "find-cache-dir": "^3.3.1",
+ "fs-extra": "^8.1.0",
+ "globby": "^6.1.0"
+ },
+ "bin": {
+ "gh-pages": "bin/gh-pages.js",
+ "gh-pages-clean": "bin/gh-pages-clean.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/gh-pages/node_modules/commander": {
+ "version": "2.20.3",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
+ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
+ "dev": true
+ },
+ "node_modules/glob": {
+ "version": "7.2.3",
+ "license": "ISC",
+ "dependencies": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.1.1",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/globby": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz",
+ "integrity": "sha512-KVbFv2TQtbzCoxAnfD6JcHZTYCzyliEaaeM/gH8qQdkKr5s0OP9scEgvdcngyk7AVdY6YVW/TJHd+lQ/Df3Daw==",
+ "dev": true,
+ "dependencies": {
+ "array-union": "^1.0.1",
+ "glob": "^7.0.3",
+ "object-assign": "^4.0.1",
+ "pify": "^2.0.0",
+ "pinkie-promise": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/graceful-fs": {
+ "version": "4.2.10",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",
+ "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==",
+ "dev": true
+ },
+ "node_modules/has": {
+ "version": "1.0.3",
+ "license": "MIT",
+ "dependencies": {
+ "function-bind": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.4.0"
+ }
+ },
+ "node_modules/has-flag": {
+ "version": "4.0.0",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/inflight": {
+ "version": "1.0.6",
+ "license": "ISC",
+ "dependencies": {
+ "once": "^1.3.0",
+ "wrappy": "1"
+ }
+ },
+ "node_modules/inherits": {
+ "version": "2.0.4",
+ "license": "ISC"
+ },
+ "node_modules/interpret": {
+ "version": "1.4.0",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/is-core-module": {
+ "version": "2.10.0",
+ "license": "MIT",
+ "dependencies": {
+ "has": "^1.0.3"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/jsonfile": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
+ "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==",
+ "dev": true,
+ "optionalDependencies": {
+ "graceful-fs": "^4.1.6"
+ }
+ },
+ "node_modules/locate-path": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
+ "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
+ "dev": true,
+ "dependencies": {
+ "p-locate": "^4.1.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/lodash": {
+ "version": "4.17.21",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
+ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
+ "dev": true
+ },
+ "node_modules/make-dir": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",
+ "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==",
+ "dev": true,
+ "dependencies": {
+ "semver": "^6.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/mime-db": {
+ "version": "1.52.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
+ "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mime-types": {
+ "version": "2.1.35",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
+ "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
+ "dependencies": {
+ "mime-db": "1.52.0"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/minimatch": {
+ "version": "3.1.2",
+ "license": "ISC",
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/object-assign": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
+ "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/once": {
+ "version": "1.4.0",
+ "license": "ISC",
+ "dependencies": {
+ "wrappy": "1"
+ }
+ },
+ "node_modules/p-limit": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
+ "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
+ "dev": true,
+ "dependencies": {
+ "p-try": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/p-locate": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
+ "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+ "dev": true,
+ "dependencies": {
+ "p-limit": "^2.2.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/p-try": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
+ "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/path-exists": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
+ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/path-is-absolute": {
+ "version": "1.0.1",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/path-parse": {
+ "version": "1.0.7",
+ "license": "MIT"
+ },
+ "node_modules/pify": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
+ "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/pinkie": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz",
+ "integrity": "sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/pinkie-promise": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz",
+ "integrity": "sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==",
+ "dev": true,
+ "dependencies": {
+ "pinkie": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/pkg-dir": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz",
+ "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==",
+ "dev": true,
+ "dependencies": {
+ "find-up": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/rechoir": {
+ "version": "0.6.2",
+ "dependencies": {
+ "resolve": "^1.1.6"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/resolve": {
+ "version": "1.22.1",
+ "license": "MIT",
+ "dependencies": {
+ "is-core-module": "^2.9.0",
+ "path-parse": "^1.0.7",
+ "supports-preserve-symlinks-flag": "^1.0.0"
+ },
+ "bin": {
+ "resolve": "bin/resolve"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/semver": {
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
+ "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
+ "dev": true,
+ "bin": {
+ "semver": "bin/semver.js"
+ }
+ },
+ "node_modules/shelljs": {
+ "version": "0.8.5",
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "glob": "^7.0.0",
+ "interpret": "^1.0.0",
+ "rechoir": "^0.6.2"
+ },
+ "bin": {
+ "shjs": "bin/shjs"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/strip-outer": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/strip-outer/-/strip-outer-1.0.1.tgz",
+ "integrity": "sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==",
+ "dev": true,
+ "dependencies": {
+ "escape-string-regexp": "^1.0.2"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/supports-color": {
+ "version": "7.2.0",
+ "license": "MIT",
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/supports-preserve-symlinks-flag": {
+ "version": "1.0.0",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/trim-repeated": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz",
+ "integrity": "sha512-pkonvlKk8/ZuR0D5tLW8ljt5I8kmxp2XKymhepUeOdCEfKpZaktSArkLHZt76OB1ZvO9bssUsDty4SWhLvZpLg==",
+ "dev": true,
+ "dependencies": {
+ "escape-string-regexp": "^1.0.2"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/universalify": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
+ "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",
+ "dev": true,
+ "engines": {
+ "node": ">= 4.0.0"
+ }
+ },
+ "node_modules/wrappy": {
+ "version": "1.0.2",
+ "license": "ISC"
+ }
+ },
+ "dependencies": {
+ "@tos_/cli-welcome": {
+ "version": "1.0.2",
+ "requires": {
+ "chalk": "^4.1.2",
+ "clear-any-console": "^1.16.2"
+ }
+ },
+ "ansi-styles": {
+ "version": "4.3.0",
+ "requires": {
+ "color-convert": "^2.0.1"
+ }
+ },
+ "array-union": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz",
+ "integrity": "sha512-Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng==",
+ "dev": true,
+ "requires": {
+ "array-uniq": "^1.0.1"
+ }
+ },
+ "array-uniq": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz",
+ "integrity": "sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==",
+ "dev": true
+ },
+ "async": {
+ "version": "2.6.4",
+ "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz",
+ "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==",
+ "dev": true,
+ "requires": {
+ "lodash": "^4.17.14"
+ }
+ },
+ "asynckit": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
+ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
+ },
+ "axios": {
+ "version": "0.27.2",
+ "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz",
+ "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==",
+ "requires": {
+ "follow-redirects": "^1.14.9",
+ "form-data": "^4.0.0"
+ }
+ },
+ "balanced-match": {
+ "version": "1.0.2"
+ },
+ "brace-expansion": {
+ "version": "1.1.11",
+ "requires": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "chalk": {
+ "version": "4.1.2",
+ "requires": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ }
+ },
+ "clear-any-console": {
+ "version": "1.16.2"
+ },
+ "color-convert": {
+ "version": "2.0.1",
+ "requires": {
+ "color-name": "~1.1.4"
+ }
+ },
+ "color-name": {
+ "version": "1.1.4"
+ },
+ "combined-stream": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
+ "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
+ "requires": {
+ "delayed-stream": "~1.0.0"
+ }
+ },
+ "commander": {
+ "version": "9.4.0"
+ },
+ "commondir": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz",
+ "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==",
+ "dev": true
+ },
+ "concat-map": {
+ "version": "0.0.1"
+ },
+ "delayed-stream": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
+ "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ=="
+ },
+ "email-addresses": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/email-addresses/-/email-addresses-3.1.0.tgz",
+ "integrity": "sha512-k0/r7GrWVL32kZlGwfPNgB2Y/mMXVTq/decgLczm/j34whdaspNrZO8CnXPf1laaHxI6ptUlsnAxN+UAPw+fzg==",
+ "dev": true
+ },
+ "escape-string-regexp": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+ "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
+ "dev": true
+ },
+ "filename-reserved-regex": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz",
+ "integrity": "sha512-lc1bnsSr4L4Bdif8Xb/qrtokGbq5zlsms/CYH8PP+WtCkGNF65DPiQY8vG3SakEdRn8Dlnm+gW/qWKKjS5sZzQ==",
+ "dev": true
+ },
+ "filenamify": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/filenamify/-/filenamify-4.3.0.tgz",
+ "integrity": "sha512-hcFKyUG57yWGAzu1CMt/dPzYZuv+jAJUT85bL8mrXvNe6hWj6yEHEc4EdcgiA6Z3oi1/9wXJdZPXF2dZNgwgOg==",
+ "dev": true,
+ "requires": {
+ "filename-reserved-regex": "^2.0.0",
+ "strip-outer": "^1.0.1",
+ "trim-repeated": "^1.0.0"
+ }
+ },
+ "find-cache-dir": {
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz",
+ "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==",
+ "dev": true,
+ "requires": {
+ "commondir": "^1.0.1",
+ "make-dir": "^3.0.2",
+ "pkg-dir": "^4.1.0"
+ }
+ },
+ "find-up": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
+ "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
+ "dev": true,
+ "requires": {
+ "locate-path": "^5.0.0",
+ "path-exists": "^4.0.0"
+ }
+ },
+ "follow-redirects": {
+ "version": "1.15.1",
+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz",
+ "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA=="
+ },
+ "form-data": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
+ "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
+ "requires": {
+ "asynckit": "^0.4.0",
+ "combined-stream": "^1.0.8",
+ "mime-types": "^2.1.12"
+ }
+ },
+ "fs-extra": {
+ "version": "8.1.0",
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",
+ "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",
+ "dev": true,
+ "requires": {
+ "graceful-fs": "^4.2.0",
+ "jsonfile": "^4.0.0",
+ "universalify": "^0.1.0"
+ }
+ },
+ "fs.realpath": {
+ "version": "1.0.0"
+ },
+ "function-bind": {
+ "version": "1.1.1"
+ },
+ "gh-pages": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/gh-pages/-/gh-pages-4.0.0.tgz",
+ "integrity": "sha512-p8S0T3aGJc68MtwOcZusul5qPSNZCalap3NWbhRUZYu1YOdp+EjZ+4kPmRM8h3NNRdqw00yuevRjlkuSzCn7iQ==",
+ "dev": true,
+ "requires": {
+ "async": "^2.6.1",
+ "commander": "^2.18.0",
+ "email-addresses": "^3.0.1",
+ "filenamify": "^4.3.0",
+ "find-cache-dir": "^3.3.1",
+ "fs-extra": "^8.1.0",
+ "globby": "^6.1.0"
+ },
+ "dependencies": {
+ "commander": {
+ "version": "2.20.3",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
+ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
+ "dev": true
+ }
+ }
+ },
+ "glob": {
+ "version": "7.2.3",
+ "requires": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.1.1",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ }
+ },
+ "globby": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz",
+ "integrity": "sha512-KVbFv2TQtbzCoxAnfD6JcHZTYCzyliEaaeM/gH8qQdkKr5s0OP9scEgvdcngyk7AVdY6YVW/TJHd+lQ/Df3Daw==",
+ "dev": true,
+ "requires": {
+ "array-union": "^1.0.1",
+ "glob": "^7.0.3",
+ "object-assign": "^4.0.1",
+ "pify": "^2.0.0",
+ "pinkie-promise": "^2.0.0"
+ }
+ },
+ "graceful-fs": {
+ "version": "4.2.10",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",
+ "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==",
+ "dev": true
+ },
+ "has": {
+ "version": "1.0.3",
+ "requires": {
+ "function-bind": "^1.1.1"
+ }
+ },
+ "has-flag": {
+ "version": "4.0.0"
+ },
+ "inflight": {
+ "version": "1.0.6",
+ "requires": {
+ "once": "^1.3.0",
+ "wrappy": "1"
+ }
+ },
+ "inherits": {
+ "version": "2.0.4"
+ },
+ "interpret": {
+ "version": "1.4.0"
+ },
+ "is-core-module": {
+ "version": "2.10.0",
+ "requires": {
+ "has": "^1.0.3"
+ }
+ },
+ "jsonfile": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
+ "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==",
+ "dev": true,
+ "requires": {
+ "graceful-fs": "^4.1.6"
+ }
+ },
+ "locate-path": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
+ "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
+ "dev": true,
+ "requires": {
+ "p-locate": "^4.1.0"
+ }
+ },
+ "lodash": {
+ "version": "4.17.21",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
+ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
+ "dev": true
+ },
+ "make-dir": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",
+ "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==",
+ "dev": true,
+ "requires": {
+ "semver": "^6.0.0"
+ }
+ },
+ "mime-db": {
+ "version": "1.52.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
+ "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="
+ },
+ "mime-types": {
+ "version": "2.1.35",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
+ "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
+ "requires": {
+ "mime-db": "1.52.0"
+ }
+ },
+ "minimatch": {
+ "version": "3.1.2",
+ "requires": {
+ "brace-expansion": "^1.1.7"
+ }
+ },
+ "object-assign": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
+ "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
+ "dev": true
+ },
+ "once": {
+ "version": "1.4.0",
+ "requires": {
+ "wrappy": "1"
+ }
+ },
+ "p-limit": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
+ "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
+ "dev": true,
+ "requires": {
+ "p-try": "^2.0.0"
+ }
+ },
+ "p-locate": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
+ "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+ "dev": true,
+ "requires": {
+ "p-limit": "^2.2.0"
+ }
+ },
+ "p-try": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
+ "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
+ "dev": true
+ },
+ "path-exists": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
+ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
+ "dev": true
+ },
+ "path-is-absolute": {
+ "version": "1.0.1"
+ },
+ "path-parse": {
+ "version": "1.0.7"
+ },
+ "pify": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
+ "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==",
+ "dev": true
+ },
+ "pinkie": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz",
+ "integrity": "sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==",
+ "dev": true
+ },
+ "pinkie-promise": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz",
+ "integrity": "sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==",
+ "dev": true,
+ "requires": {
+ "pinkie": "^2.0.0"
+ }
+ },
+ "pkg-dir": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz",
+ "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==",
+ "dev": true,
+ "requires": {
+ "find-up": "^4.0.0"
+ }
+ },
+ "rechoir": {
+ "version": "0.6.2",
+ "requires": {
+ "resolve": "^1.1.6"
+ }
+ },
+ "resolve": {
+ "version": "1.22.1",
+ "requires": {
+ "is-core-module": "^2.9.0",
+ "path-parse": "^1.0.7",
+ "supports-preserve-symlinks-flag": "^1.0.0"
+ }
+ },
+ "semver": {
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
+ "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
+ "dev": true
+ },
+ "shelljs": {
+ "version": "0.8.5",
+ "requires": {
+ "glob": "^7.0.0",
+ "interpret": "^1.0.0",
+ "rechoir": "^0.6.2"
+ }
+ },
+ "strip-outer": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/strip-outer/-/strip-outer-1.0.1.tgz",
+ "integrity": "sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==",
+ "dev": true,
+ "requires": {
+ "escape-string-regexp": "^1.0.2"
+ }
+ },
+ "supports-color": {
+ "version": "7.2.0",
+ "requires": {
+ "has-flag": "^4.0.0"
+ }
+ },
+ "supports-preserve-symlinks-flag": {
+ "version": "1.0.0"
+ },
+ "trim-repeated": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz",
+ "integrity": "sha512-pkonvlKk8/ZuR0D5tLW8ljt5I8kmxp2XKymhepUeOdCEfKpZaktSArkLHZt76OB1ZvO9bssUsDty4SWhLvZpLg==",
+ "dev": true,
+ "requires": {
+ "escape-string-regexp": "^1.0.2"
+ }
+ },
+ "universalify": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
+ "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",
+ "dev": true
+ },
+ "wrappy": {
+ "version": "1.0.2"
+ }
+ }
+}
diff --git a/CLI-Tools-MERN-Stack-beginners/sirdeploy/package.json b/CLI-Tools-MERN-Stack-beginners/sirdeploy/package.json
new file mode 100644
index 00000000..6f0d6c33
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/sirdeploy/package.json
@@ -0,0 +1,49 @@
+{
+ "name": "sirdeploy",
+ "version": "1.0.14",
+ "description": "Easily Create Any Server and deploy it on Heroku",
+ "main": "index.js",
+ "scripts": {
+ "server": "nodemon src/index"
+ },
+ "keywords": [
+ "deploy",
+ "server in 1 click",
+ "server",
+ "heroku",
+ "heroku-cli",
+ "heroku-deploy",
+ "heroku-deploy-server",
+ "heroku-deploy-server-cli",
+ "heroku-deploy-server-node",
+ "heroku-deploy-server-node-cli",
+ "heroku-deploy-server-node-js",
+ "heroku-deploy-server-node-js-cli",
+ "heroku-deploy-server-node-js-nodemon",
+ "heroku-deploy-server-node-js-nodemon-cli",
+ "heroku-deploy-server-node-js-nodemon-server",
+ "heroku-deploy-server-node-js-nodemon-server-cli"
+ ],
+ "author": {
+ "name": "Shantanu Bombatkar",
+ "email": "shodkkshantanu@gmail.com",
+ "url": "https://github.com/shaantanu9"
+ },
+ "files": [
+ "commands/*",
+ "index.js"
+ ],
+ "bin": {
+ "deploy": "index.js"
+ },
+ "license": "MIT",
+ "dependencies": {
+ "@tos_/cli-welcome": "^1.0.2",
+ "axios": "^0.27.2",
+ "commander": "^9.0.0",
+ "shelljs": "^0.8.5"
+ },
+ "devDependencies": {
+ "gh-pages": "^4.0.0"
+ }
+}
diff --git a/CLI-Tools-MERN-Stack-beginners/sirdeploy/readme.md b/CLI-Tools-MERN-Stack-beginners/sirdeploy/readme.md
new file mode 100644
index 00000000..b23bad96
--- /dev/null
+++ b/CLI-Tools-MERN-Stack-beginners/sirdeploy/readme.md
@@ -0,0 +1,84 @@
+# Deploy Server
+
+[Site](https://shantanubombatkar.shodkk.com) |
+[Contributing](https://github.com/shaantanu9/DeployHerokuServer) |
+[Code of Conduct](https://code-of-conduct.openjsf.org) |
+[Twitter](https://twitter.com/ShantanuMali9) |
+[Chat](https://gitter.im/shaantanu9)
+
+### Bored Creating Server and Deploying it on Heroku
+The [sirdeploy](https://github.com/shaantanu9/DeployHerokuServer) is a npm Package that help you do all this deployement in single click.
+
+## $ npm i --location=global sirdeploy
+#### It is CLI Base so need to install Globally
+
+#
+### How to Use in Terminal:
+```shell
+Steps to Follow:
+1. Install sirdeploy Globally: $ npm i --location=global sirdeploy
+2. Create a Folder with Any name: $ mkdir newProject.
+3. create db.json file with respected data.
+4. sirdeploy heroku-fakeserver newProject
+
+```
+
+## Go Through the Already Build Templates
+
+**sirdeploy** is released under the [MIT license](https://github.com/shaantanu9/DeployHerokuServer/blob/main/LICENSE) & supports modern environments.
+#### Please Star the [Repo](https://github.com/shaantanu9/DeployHerokuServer) on GitHub and Share with Other Fellow Developers
+
+## Installation
+
+Using npm:
+```shell
+$ npm i --location=global sirdeploy
+// it is CLI Base so need to install Globally
+
+$ mkdir newProject
+// File that contain the db.json data
+
+$ sirdeploy heroku-fakeserver newProject
+// Last Command that Do Everything for you
+```
+Note: add `--save` if you are using npm < 5.0.0
+
+
+
+Bore Create FakeBackend for React App, or any other Framework Try this Package Once.
+
+## Why sirdeploy Package?
+
+Programming is all About simplifying and Automating Stuff
+
+### Then Why Build Same BoilerPlate Again and Again
+
+
+Use this Package and (getAwayFromThePain) create BoilerPlate
+ * Get Read of Wrting and Creating Same Thing
+ * Directly Start Working on the real Logic
+ * Reduce time of Development by atleast 10%
+
+### Please Contribute Models and Controllers
+
+#### Become a [Open Source Contributer](https://github.com/shaantanu9/DeployHerokuServer)
+We **sirdeploy** wants to help Each and Every Programmer Writing real Logical code, without **wasting time** this simple thing.
+
+So We are Here With this Package to help you to write real Logical code, without wasting time.
+
+### How can You Support and Help others?
+
+
+ * Go the [Github Repo](https://github.com/shaantanu9/DeployHerokuServer)
+ * Fork that Repo
+ * Clone and Download it and Add the File in given manner.
+ * Add the Changes and push to your account.
+ * Upload in your Repo => Pull Request and Done
+
+
+ ## Licence
+ MIT
+
+ #### I love to work on ***All Open Source Projects***
+ #### **Please Please Contact Me** [Linkedin](https://www.linkedin.com/in/shantanu-bombatkar) [Twitter](https://twitter.com/ShantanuMali9)
+
\ No newline at end of file