UNPKG

goto-react-app

Version:

Quick, lightweight React, Redux, React-Router boilerplate application.

26 lines (25 loc) 1.31 kB
#!/usr/bin/env node ;(async function() { if (process.argv.length < 3) { process.argv.push(".") } console.log("'\x1b[36m%s\x1b[0m'", "Creating GoTo React application...") let exec = require("child_process").exec let filename = process.argv[2] exec("git clone https://github.com/alexchomiak/goto-react-app/ " + filename, (error, stdout, stderr) => { console.log("'\x1b[36m%s\x1b[0m'", "Cloning https://github.com/alexchomiak/goto-react-app/ into " + filename) console.log("'\x1b[36m%s\x1b[0m'", "Running npm install") exec(`cd ${filename} && rm -rf .git`, (error, stdout, stderr) => { exec(`cd ${filename} && git init`, (error, stdout, stderr) => { let npm = exec(`cd ${filename} && npm install`, (error, stdout, stderr) => { console.log("'\x1b[36m%s\x1b[0m'", "Thank you for using goto-react-webpack!") console.log("'\x1b[33m%s\x1b[0m'", "Please leave a star in the git repository! https://github.com/alexchomiak/goto-react-app/") console.log("'\x1b[36m%s\x1b[0m'", "Application created. Happy coding!") }) npm.stdout.on("data", data => { console.log(data) }) }) }) }) })()