@akash.dev/react-start 1.0.0 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. package/bin/cli.js +13 -5
  2. package/package.json +1 -1
  3. package/readme +29 -0
package/bin/cli.js CHANGED
@@ -11,15 +11,23 @@ const runCommand = command =>{
11
11
  }
12
12
  const repoName = process.argv[2];
13
13
  console.log(repoName);
14
- const gitCheckoutCommand = `git clone --dept 1 https://github.com/arakash-developer/nextjs-starter ${repoName}`;
15
- const installDepsCommand = `cd ${repoName} && npm install`;
14
+ const repoName2 = process.argv[1].split('\\');
15
+ repoName2.pop('cli.js');
16
+ // console.log(my);
17
+ // repoName2.push('a')
18
+ let newa = repoName2.join("/")
19
+ // console.log(repoName2);
20
+ console.log(newa);
21
+
22
+ // let mypath = `C:/Users/my-pc/Documents/GitHub/react-starter/a`;
23
+ const gitCheckoutCommand = `git clone https://github.com/arakash-developer/reactjs-start.git ${newa}`;
24
+ // const installDepsCommand = `cd ${repoName} && npm install`;
16
25
  // console.log(`Cloning the repository with name ${repoName}`);
17
26
  console.log(`Installing Packages for ${repoName} @akash.dev`);
18
27
  const checkedOut = runCommand(gitCheckoutCommand);
19
28
  if(!checkedOut) process.exit(-1);
20
29
  console.log(`Installing dependencies for ${repoName} @akash.dev`);
21
- const installedDeps = runCommand(installDepsCommand);
22
- if(!installedDeps) process.exit(-1);
30
+ // const installedDeps = runCommand(installDepsCommand);
31
+ // if(!installedDeps) process.exit(-1);
23
32
  console.log(`Congratulation!! You are Ready @akash.dev`);
24
33
  console.log(`cd ${repoName} && npm run dev or npm start @akash.dev`);
25
-
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akash.dev/react-start",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "main": "index.js",
5
5
  "bin": "./bin/cli.js",
6
6
  "scripts": {
package/readme ADDED
@@ -0,0 +1,29 @@
1
+
2
+
3
+
4
+
5
+ // #!/usr/bin/env node
6
+ // const {execSync} = require('child_process');
7
+ // const runCommand = command =>{
8
+ // try{
9
+ // execSync(`${command}`,{stdio: 'inherit'});
10
+ // }catch(e){
11
+ // console.error(`Failed to execute ${command}`,e);
12
+ // return false;
13
+ // }
14
+ // return true;
15
+ // }
16
+ // const repoName = process.argv[2];
17
+ // console.log(repoName);
18
+ // const gitCheckoutCommand = `git clone --dept 1 https://github.com/arakash-developer/reactjs-start ${repoName}`;
19
+ // const installDepsCommand = `cd ${repoName} && npm install`;
20
+ // // console.log(`Cloning the repository with name ${repoName}`);
21
+ // console.log(`Installing Packages for ${repoName} @akash.dev`);
22
+ // const checkedOut = runCommand(gitCheckoutCommand);
23
+ // if(!checkedOut) process.exit(-1);
24
+ // console.log(`Installing dependencies for ${repoName} @akash.dev`);
25
+ // const installedDeps = runCommand(installDepsCommand);
26
+ // if(!installedDeps) process.exit(-1);
27
+ // console.log(`Congratulation!! You are Ready @akash.dev`);
28
+ // console.log(`cd ${repoName} && npm run dev or npm start @akash.dev`);
29
+