Skip to content

Commit d78ad93

Browse files
committed
added create-react-app cli
1 parent bb1bab1 commit d78ad93

4 files changed

Lines changed: 15 additions & 60 deletions

File tree

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
"name": "create-react-webpack",
33
"version": "0.0.1",
44
"description": "create-react-webpack ",
5-
"main": "create.js",
5+
"main": "scripts/create.js",
6+
"bin": {
7+
"create-react-webpack": "startApp.sh"
8+
},
9+
"preferGlobal": true,
610
"scripts": {
711
"create-react-webpack": "node scripts/create.js"
812
},

scripts/create.js

100644100755
File mode changed.

startApp.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env node
2+
3+
const path = require("path");
4+
const child_process = require("child_process");
5+
6+
var args = process.argv.slice(2);
7+
var dirName = args[0];
8+
9+
var p=path.join(__dirname,"scripts/create.js")
10+
child_process.execSync(`node ${p} ${dirName}`,{ stdio: "inherit" });

template/temp.txt

Lines changed: 0 additions & 59 deletions
This file was deleted.

0 commit comments

Comments
 (0)