Skip to content

Commit b0885df

Browse files
committed
v0.1.0
1 parent 8217645 commit b0885df

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

bin/generate-app.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ if (projectName !== '.') {
2323
if (error.code === 'EEXIST') {
2424
console.log(projectName);
2525
console.log(
26-
`The file ${projectName} already exist in the current directory, please give it another name.`
26+
`The file ${projectName} already exist in the current directory, please give it another name.`,
2727
);
2828
} else {
2929
console.log(error);
@@ -40,15 +40,14 @@ async function main() {
4040
if (projectName !== '.') {
4141
process.chdir(projectPath);
4242
}
43-
console.log('Remove git version file');
43+
44+
console.log('Removing useless files');
45+
execSync('npx rimraf ./bin');
4446
execSync('npx rimraf ./.git');
4547

4648
console.log('💾 Yarn install...');
4749
execSync('yarn');
4850

49-
console.log('🗑 Removing useless files');
50-
execSync('npx rimraf ./.bin');
51-
5251
console.log('The installation is done, this is ready to use !');
5352
} catch (error) {
5453
console.log(error);

package.json

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
"version": "0.1.0",
44
"description": "It automatically builds a react, webpack, and typescript working environment",
55
"main": "index.tsx",
6-
"scripts": {
7-
"dev": "webpack-dev-server --config config/webpack.dev.js",
8-
"build": "webpack --config config/webpack.prod.js"
6+
"bin": {
7+
"create-react-webpack-ts-app": "./bin/generate-app.js"
98
},
109
"license": "ISC",
1110
"homepage": "https://github.com/vvs-kim/react-webpack-ts-boilerplate",
@@ -20,11 +19,19 @@
2019
"react",
2120
"typescript",
2221
"webpack",
22+
"boilerplate",
23+
"CRA",
2324
"yarn-berry",
25+
"zero-install",
2426
"prettier",
2527
"airbnb",
26-
"eslint"
28+
"eslint",
29+
"prettier"
2730
],
31+
"scripts": {
32+
"dev": "webpack-dev-server --config config/webpack.dev.js",
33+
"build": "webpack --config config/webpack.prod.js"
34+
},
2835
"dependencies": {
2936
"react": "^18.0.0",
3037
"react-dom": "^18.0.0",

0 commit comments

Comments
 (0)