@akash.dev/react-start 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitattributes +2 -0
- package/bin/cli.js +25 -0
- package/index.js +0 -0
- package/package.json +12 -0
package/.gitattributes
ADDED
package/bin/cli.js
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
#!/usr/bin/env node
|
2
|
+
const {execSync} = require('child_process');
|
3
|
+
const runCommand = command =>{
|
4
|
+
try{
|
5
|
+
execSync(`${command}`,{stdio: 'inherit'});
|
6
|
+
}catch(e){
|
7
|
+
console.error(`Failed to execute ${command}`,e);
|
8
|
+
return false;
|
9
|
+
}
|
10
|
+
return true;
|
11
|
+
}
|
12
|
+
const repoName = process.argv[2];
|
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`;
|
16
|
+
// console.log(`Cloning the repository with name ${repoName}`);
|
17
|
+
console.log(`Installing Packages for ${repoName} @akash.dev`);
|
18
|
+
const checkedOut = runCommand(gitCheckoutCommand);
|
19
|
+
if(!checkedOut) process.exit(-1);
|
20
|
+
console.log(`Installing dependencies for ${repoName} @akash.dev`);
|
21
|
+
const installedDeps = runCommand(installDepsCommand);
|
22
|
+
if(!installedDeps) process.exit(-1);
|
23
|
+
console.log(`Congratulation!! You are Ready @akash.dev`);
|
24
|
+
console.log(`cd ${repoName} && npm run dev or npm start @akash.dev`);
|
25
|
+
|
package/index.js
ADDED
File without changes
|
package/package.json
ADDED