create-payload-app 0.3.9 → 0.3.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -159,7 +159,7 @@ function updatePayloadVersion(projectDir, betaFlag) {
|
|
|
159
159
|
exports.updatePayloadVersion = updatePayloadVersion;
|
|
160
160
|
function createProject(args, projectDir, template, packageManager) {
|
|
161
161
|
return __awaiter(this, void 0, void 0, function () {
|
|
162
|
-
var templateDir, emitter, err_2, msg, spinner, result;
|
|
162
|
+
var templateDir, emitter, src, dest, gi, giDest, err_2, msg, spinner, result;
|
|
163
163
|
return __generator(this, function (_a) {
|
|
164
164
|
switch (_a.label) {
|
|
165
165
|
case 0: return [4 /*yield*/, createProjectDir(projectDir)];
|
|
@@ -172,28 +172,41 @@ function createProject(args, projectDir, template, packageManager) {
|
|
|
172
172
|
return [4 /*yield*/, emitter.clone(projectDir)];
|
|
173
173
|
case 2:
|
|
174
174
|
_a.sent();
|
|
175
|
-
return [3 /*break*/,
|
|
175
|
+
return [3 /*break*/, 9];
|
|
176
176
|
case 3:
|
|
177
|
-
_a.trys.push([3,
|
|
177
|
+
_a.trys.push([3, 8, , 9]);
|
|
178
178
|
return [4 /*yield*/, fs_extra_1.default.copy(templateDir, projectDir, { recursive: true })];
|
|
179
179
|
case 4:
|
|
180
180
|
_a.sent();
|
|
181
|
-
|
|
182
|
-
|
|
181
|
+
if (!(packageManager === 'npm')) return [3 /*break*/, 6];
|
|
182
|
+
src = path_1.default.resolve(templateDir, '..', 'npmrc.template');
|
|
183
|
+
dest = path_1.default.resolve(projectDir, '.npmrc');
|
|
184
|
+
return [4 /*yield*/, fs_extra_1.default.copy(src, dest)];
|
|
183
185
|
case 5:
|
|
186
|
+
_a.sent();
|
|
187
|
+
_a.label = 6;
|
|
188
|
+
case 6:
|
|
189
|
+
gi = path_1.default.resolve(templateDir, '..', 'gitignore.template');
|
|
190
|
+
giDest = path_1.default.resolve(projectDir, '.gitignore');
|
|
191
|
+
return [4 /*yield*/, fs_extra_1.default.copy(gi, giDest)];
|
|
192
|
+
case 7:
|
|
193
|
+
_a.sent();
|
|
194
|
+
(0, log_1.success)('Project directory created');
|
|
195
|
+
return [3 /*break*/, 9];
|
|
196
|
+
case 8:
|
|
184
197
|
err_2 = _a.sent();
|
|
185
198
|
msg = 'Unable to copy template files. Please check template name or directory permissions.';
|
|
186
199
|
(0, log_1.error)(msg);
|
|
187
200
|
process.exit(1);
|
|
188
|
-
return [3 /*break*/,
|
|
189
|
-
case
|
|
201
|
+
return [3 /*break*/, 9];
|
|
202
|
+
case 9:
|
|
190
203
|
spinner = (0, ora_1.default)('Checking latest Payload version...').start();
|
|
191
204
|
return [4 /*yield*/, updatePayloadVersion(projectDir, args['--beta'])];
|
|
192
|
-
case
|
|
205
|
+
case 10:
|
|
193
206
|
_a.sent();
|
|
194
207
|
spinner.text = 'Installing dependencies...';
|
|
195
208
|
return [4 /*yield*/, installDeps(args, projectDir, packageManager)];
|
|
196
|
-
case
|
|
209
|
+
case 11:
|
|
197
210
|
result = _a.sent();
|
|
198
211
|
spinner.stop();
|
|
199
212
|
spinner.clear();
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
### Node ###
|
|
2
|
+
# Logs
|
|
3
|
+
logs
|
|
4
|
+
*.log
|
|
5
|
+
npm-debug.log*
|
|
6
|
+
yarn-debug.log*
|
|
7
|
+
yarn-error.log*
|
|
8
|
+
lerna-debug.log*
|
|
9
|
+
.pnpm-debug.log*
|
|
10
|
+
|
|
11
|
+
# Diagnostic reports (https://nodejs.org/api/report.html)
|
|
12
|
+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
|
13
|
+
|
|
14
|
+
# Runtime data
|
|
15
|
+
pids
|
|
16
|
+
*.pid
|
|
17
|
+
*.seed
|
|
18
|
+
*.pid.lock
|
|
19
|
+
|
|
20
|
+
# Directory for instrumented libs generated by jscoverage/JSCover
|
|
21
|
+
lib-cov
|
|
22
|
+
|
|
23
|
+
# Coverage directory used by tools like istanbul
|
|
24
|
+
coverage
|
|
25
|
+
*.lcov
|
|
26
|
+
|
|
27
|
+
# nyc test coverage
|
|
28
|
+
.nyc_output
|
|
29
|
+
|
|
30
|
+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
|
31
|
+
.grunt
|
|
32
|
+
|
|
33
|
+
# Bower dependency directory (https://bower.io/)
|
|
34
|
+
bower_components
|
|
35
|
+
|
|
36
|
+
# node-waf configuration
|
|
37
|
+
.lock-wscript
|
|
38
|
+
|
|
39
|
+
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
|
40
|
+
build/Release
|
|
41
|
+
|
|
42
|
+
# Dependency directories
|
|
43
|
+
node_modules/
|
|
44
|
+
jspm_packages/
|
|
45
|
+
|
|
46
|
+
# Snowpack dependency directory (https://snowpack.dev/)
|
|
47
|
+
web_modules/
|
|
48
|
+
|
|
49
|
+
# TypeScript cache
|
|
50
|
+
*.tsbuildinfo
|
|
51
|
+
|
|
52
|
+
# Optional npm cache directory
|
|
53
|
+
.npm
|
|
54
|
+
|
|
55
|
+
# Optional eslint cache
|
|
56
|
+
.eslintcache
|
|
57
|
+
|
|
58
|
+
# Optional stylelint cache
|
|
59
|
+
.stylelintcache
|
|
60
|
+
|
|
61
|
+
# Microbundle cache
|
|
62
|
+
.rpt2_cache/
|
|
63
|
+
.rts2_cache_cjs/
|
|
64
|
+
.rts2_cache_es/
|
|
65
|
+
.rts2_cache_umd/
|
|
66
|
+
|
|
67
|
+
# Optional REPL history
|
|
68
|
+
.node_repl_history
|
|
69
|
+
|
|
70
|
+
# Output of 'npm pack'
|
|
71
|
+
*.tgz
|
|
72
|
+
|
|
73
|
+
# Yarn Integrity file
|
|
74
|
+
.yarn-integrity
|
|
75
|
+
|
|
76
|
+
# dotenv environment variable files
|
|
77
|
+
.env
|
|
78
|
+
.env.development.local
|
|
79
|
+
.env.test.local
|
|
80
|
+
.env.production.local
|
|
81
|
+
.env.local
|
|
82
|
+
|
|
83
|
+
# parcel-bundler cache (https://parceljs.org/)
|
|
84
|
+
.cache
|
|
85
|
+
.parcel-cache
|
|
86
|
+
|
|
87
|
+
# Next.js build output
|
|
88
|
+
.next
|
|
89
|
+
out
|
|
90
|
+
|
|
91
|
+
# Nuxt.js build / generate output
|
|
92
|
+
.nuxt
|
|
93
|
+
dist
|
|
94
|
+
|
|
95
|
+
# Gatsby files
|
|
96
|
+
.cache/
|
|
97
|
+
# Comment in the public line in if your project uses Gatsby and not Next.js
|
|
98
|
+
# https://nextjs.org/blog/next-9-1#public-directory-support
|
|
99
|
+
# public
|
|
100
|
+
|
|
101
|
+
# vuepress build output
|
|
102
|
+
.vuepress/dist
|
|
103
|
+
|
|
104
|
+
# vuepress v2.x temp and cache directory
|
|
105
|
+
.temp
|
|
106
|
+
|
|
107
|
+
# Docusaurus cache and generated files
|
|
108
|
+
.docusaurus
|
|
109
|
+
|
|
110
|
+
# Serverless directories
|
|
111
|
+
.serverless/
|
|
112
|
+
|
|
113
|
+
# FuseBox cache
|
|
114
|
+
.fusebox/
|
|
115
|
+
|
|
116
|
+
# DynamoDB Local files
|
|
117
|
+
.dynamodb/
|
|
118
|
+
|
|
119
|
+
# TernJS port file
|
|
120
|
+
.tern-port
|
|
121
|
+
|
|
122
|
+
# Stores VSCode versions used for testing VSCode extensions
|
|
123
|
+
.vscode-test
|
|
124
|
+
|
|
125
|
+
# yarn v2
|
|
126
|
+
.yarn/cache
|
|
127
|
+
.yarn/unplugged
|
|
128
|
+
.yarn/build-state.yml
|
|
129
|
+
.yarn/install-state.gz
|
|
130
|
+
.pnp.*
|
|
131
|
+
|
|
132
|
+
### Node Patch ###
|
|
133
|
+
# Serverless Webpack directories
|
|
134
|
+
.webpack/
|
|
135
|
+
|
|
136
|
+
# Optional stylelint cache
|
|
137
|
+
|
|
138
|
+
# SvelteKit build / generate output
|
|
139
|
+
.svelte-kit
|
|
140
|
+
|
|
141
|
+
### VisualStudioCode ###
|
|
142
|
+
.vscode/*
|
|
143
|
+
!.vscode/settings.json
|
|
144
|
+
!.vscode/tasks.json
|
|
145
|
+
!.vscode/launch.json
|
|
146
|
+
!.vscode/extensions.json
|
|
147
|
+
!.vscode/*.code-snippets
|
|
148
|
+
|
|
149
|
+
# Local History for Visual Studio Code
|
|
150
|
+
.history/
|
|
151
|
+
|
|
152
|
+
# Built Visual Studio Code Extensions
|
|
153
|
+
*.vsix
|
|
154
|
+
|
|
155
|
+
### VisualStudioCode Patch ###
|
|
156
|
+
# Ignore all local history of files
|
|
157
|
+
.history
|
|
158
|
+
.ionide
|
|
159
|
+
|
|
160
|
+
# Support for Project snippet scope
|
|
161
|
+
.vscode/*.code-snippets
|
|
162
|
+
|
|
163
|
+
# Ignore code-workspaces
|
|
164
|
+
*.code-workspace
|
|
165
|
+
|
|
166
|
+
# End of https://www.toptal.com/developers/gitignore/api/node,visualstudiocode
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
legacy-peer-deps=true
|