generated from brocoders/nestjs-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.ts
61 lines (55 loc) · 1.3 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import prompts from 'prompts';
import removeFacebookAuth from './scripts/remove-auth-facebook';
import removeGoogleAuth from './scripts/remove-auth-google';
import removeAppleAuth from './scripts/remove-auth-apple';
import removeTwitterAuth from './scripts/remove-auth-twitter';
import removeInstallScripts from './scripts/remove-install-scripts';
(async () => {
const response = await prompts(
[
{
type: 'confirm',
name: 'isAuthFacebook',
message: 'Include Facebook auth?',
initial: true,
},
{
type: 'confirm',
name: 'isAuthGoogle',
message: 'Include Google auth?',
initial: true,
},
{
type: 'confirm',
name: 'isAuthTwitter',
message: 'Include Twitter auth?',
initial: true,
},
{
type: 'confirm',
name: 'isAuthApple',
message: 'Include Apple auth?',
initial: true,
},
],
{
onCancel() {
process.exit(1);
},
},
);
if (!response.isAuthFacebook) {
removeFacebookAuth();
}
if (!response.isAuthGoogle) {
removeGoogleAuth();
}
if (!response.isAuthTwitter) {
removeTwitterAuth();
}
if (!response.isAuthApple) {
removeAppleAuth();
}
removeInstallScripts();
process.exit(0);
})();