forked from kickstartDS/storyblok-starter-premium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
plopfile.mjs
57 lines (57 loc) · 1.21 KB
/
plopfile.mjs
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
export default function netrc(plop) {
plop.setGenerator("netrc", {
description: "add netrc file from environment",
prompts: [
{
type: "input",
name: "email",
message: "Email Address for Storyblok user",
},
{
type: "input",
name: "oauthToken",
message: "Next Storyblok Oauth Token",
},
{
type: "input",
name: "region",
message: "Region your space uses",
},
],
actions: [
{
type: "add",
path: `${process.env.HOME}/.netrc`,
skipIfExists: true,
templateFile: "resources/netrc.hbs",
},
],
});
plop.setGenerator("env", {
description: "add .env.local to project",
prompts: [
{
type: "input",
name: "apiToken",
message: "Next Storyblok API Token",
},
{
type: "input",
name: "oauthToken",
message: "Next Storyblok Oauth Token",
},
{
type: "input",
name: "spaceId",
message: "Next Storyblok Space ID",
},
],
actions: [
{
type: "add",
path: `.env.local`,
templateFile: "resources/env.hbs",
},
],
});
}