Skip to content

Commit ba9a95c

Browse files
authored
Merge pull request #3 from ljlm0402/development
🎉 Releases v1.0.0
2 parents ce4a1e5 + ffdefdb commit ba9a95c

File tree

9 files changed

+91
-12
lines changed

9 files changed

+91
-12
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
## 🌈 tsghc?
1313

14-
tsghc is a CLI module that quickly fetches and uses Repositories composed of TypeScript.
14+
__tsghc__ is a CLI module that quickly fetches and uses Repositories composed of TypeScript.
1515

1616
## 🚀 Quick Start
1717

@@ -29,7 +29,7 @@ $ tsghc
2929

3030
<img src='https://github.com/ljlm0402/tsghc/raw/images/cli.gif' border='0' alt='cli' />
3131

32-
## 📩 Please tell us your Repositories
32+
## 🤝 Please pull request from your repository.
3333

3434
Add it to the template folder file according to your repo's framework.
3535

bin/cli.js

+5-9
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* The person who developed it is AGUMON <[email protected]>.
66
* The date of development is September 29, 2020.
77
*****************************************************************/
8+
'use strict';
89

910
const inquirer = require("inquirer");
1011
const figlet = require("figlet");
@@ -41,7 +42,7 @@ function getProject() {
4142
type: "input",
4243
name: "name",
4344
message: "Please enter the desired project name.",
44-
default: "starter-project",
45+
default: "Selected Template Name",
4546
},
4647
{
4748
type: "list",
@@ -82,18 +83,13 @@ function cloneProject(project, template) {
8283
return new Promise(async (resolve, reject) => {
8384
try {
8485
const result = await inquirer.prompt(template);
86+
const projectName = project.name === 'selected-template-name' ? result.template : project.name;
8587
const target = require(`../template/${project.framework.toLowerCase()}`).find(template => template.name === result.template);
86-
await clone(target.url, `./${project.name}`);
88+
clone(target.url, `./${projectName}`);
8789

8890
resolve(target);
8991
} catch(error) {
90-
if (error.isTtyError) {
91-
console.log("Prompt couldn't be rendered in the current environment");
92-
} else {
93-
console.log("Something else when wrong");
94-
}
95-
96-
reject(error)
92+
reject(error);
9793
}
9894
});
9995
}

package.json

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
11
{
22
"name": "tsghc",
3-
"version": "0.0.3",
3+
"version": "1.0.0",
44
"description": "TypeScript GitHub Clone CLI Tool",
55
"author": "AGUMON <[email protected]>",
66
"license": "MIT",
77
"main": "bin/cli.js",
88
"keywords": [
99
"typescript",
10+
"boilerplate",
1011
"starter",
1112
"cli",
1213
"github",
1314
"clone",
15+
"angular",
16+
"react",
17+
"vue",
18+
"express",
19+
"fastify",
20+
"nest",
1421
"project"
1522
],
1623
"bin": {

template/angular.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
module.exports = [
24
{
35
name: 'universal-starter',

template/express.js

+32
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,39 @@
1+
'use strict';
2+
13
module.exports = [
24
{
35
name: 'ts-express-boilerplate',
46
url: 'https://github.com/d4rkstar/ts-express-boilerplate.git',
57
author: 'd4rkstar'
8+
},
9+
{
10+
name: 'node-express-mysql-typescript-api-boilerplate',
11+
url: 'https://github.com/a7urag/node-express-mysql-typescript-api-boilerplate.git',
12+
author: 'a7urag'
13+
},
14+
{
15+
name: 'express-typescript-starter',
16+
url: 'https://github.com/rjmacarthy/express-typescript-starter.git',
17+
author: 'rjmacarthy'
18+
},
19+
{
20+
name: 'docker-express-typescript-boilerplate',
21+
url: 'https://github.com/sidhantpanda/docker-express-typescript-boilerplate.git',
22+
author: 'sidhantpanda'
23+
},
24+
{
25+
name: 'nodejs-boilerplate',
26+
url: 'https://github.com/satishbabariya/nodejs-boilerplate.git',
27+
author: 'satishbabariya'
28+
},
29+
{
30+
name: 'ts-backend-template',
31+
url: 'https://github.com/changhoi/ts-backend-template.git',
32+
author: 'changhoi'
33+
},
34+
{
35+
name: 'api_server_boilerplate',
36+
url: 'https://github.com/Q00/api_server_boilerplate.git',
37+
author: 'Q00'
638
}
739
];

template/fastify.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
'use strict';
2+
3+
module.exports = [
4+
{
5+
name: 'fastify-typescript-starter',
6+
url: 'https://github.com/matschik/fastify-typescript-starter.git',
7+
author: 'matschik'
8+
}
9+
];

template/nest.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
'use strict';
2+
3+
module.exports = [
4+
{
5+
name: 'nestjs-boilerplate',
6+
url: 'https://github.com/mung9/nestjs-boilerplate.git',
7+
author: 'mung9'
8+
},
9+
{
10+
name: 'nestjs-todo-api-demo',
11+
url: 'https://github.com/changhoi/nestjs-todo-api-demo.git',
12+
author: 'changhoi'
13+
}
14+
];

template/react.js

+7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1+
'use strict';
2+
13
module.exports = [
24
{
35
name: 'react-redux-typescript-boilerplate',
46
url: 'https://github.com/rokoroku/react-redux-typescript-boilerplate.git',
57
author: 'rokoroku'
8+
},
9+
{
10+
name: 'next-boilerplate',
11+
url: 'https://github.com/qvil/next-boilerplate.git',
12+
author: 'qvil'
613
}
714
];

template/vue.js

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
module.exports = [
24
{
35
name: 'vue-typescript-admin-template',
@@ -8,5 +10,15 @@ module.exports = [
810
name: 'vue-typescript-admin-element-ui',
911
url: 'https://github.com/zengxiaozeng/vue-typescript-admin-element-ui.git',
1012
author: 'zengxiaozeng'
13+
},
14+
{
15+
name: 'StarAdmin-Free-Vue-Admin-Template',
16+
url: 'https://github.com/BootstrapDash/StarAdmin-Free-Vue-Admin-Template.git',
17+
author: 'BootstrapDash'
18+
},
19+
{
20+
name: 'vue-element-admin-ts',
21+
url: 'https://github.com/cklwblove/vue-element-admin-ts.git',
22+
author: 'cklwblove'
1123
}
1224
];

0 commit comments

Comments
 (0)