-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspin
82 lines (66 loc) · 2.02 KB
/
spin
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
(name spin-rescript)
(description "ReScript application")
(config project_name
(input (prompt "Project name")))
(config project_slug
(input (prompt "Project slug"))
(default (slugify :project_name))
(rules
("The project slug must be lowercase and contain ASCII characters and '-' only."
(eq :project_slug (slugify :project_slug)))))
(config project_snake
(default (snake_case :project_slug)))
(config project_description
(input (prompt "Description"))
(default "A short, but powerful statement about your project"))
(config username
(input (prompt "Name of the author")))
(config syntax
(select
(prompt "Which syntax do you use?")
(values ReScript Reason))
(default ReScript))
(config css_framework
(select
(prompt "Which CSS framework do you use?")
(values TailwindCSS None))
(default None))
(config ci_cd
(select
(prompt "Which CI/CD do you use?")
(values Github None))
(default Github))
(ignore
(files config/postcss.config.js config/tailwind.config.js)
(enabled_if (neq :css_framework TailwindCSS)))
(ignore
(files .github/*)
(enabled_if (neq :ci_cd Github)))
(ignore
(files */*.re */*.rei)
(enabled_if (neq :syntax Reason)))
(ignore
(files */*.res */*.resi)
(enabled_if (neq :syntax ReScript)))
(post_gen
(actions
(run yarn install))
(message "🎁 Installing packages. This might take a couple minutes.")
(enabled_if (not (run which yarn))))
(post_gen
(actions
(run npm install))
(message "🎁 Installing packages. This might take a couple minutes.")
(enabled_if (run which yarn)))
(example_commands
(commands
("yarn start" "Start the development server.")
("yarn build" "Bundle the app into static files for production.")
("yarn test" "Start the test runner."))
(enabled_if (not (run which yarn))))
(example_commands
(commands
("npm start" "Start the development server.")
("npm build" "Bundle the app into static files for production.")
("npm test" "Start the test runner."))
(enabled_if (run which yarn)))