create-payload-app 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -125,7 +125,7 @@ function updatePackageJSONName(args) {
125
125
  exports.updatePackageJSONName = updatePackageJSONName;
126
126
  function createProject(args) {
127
127
  return __awaiter(this, void 0, void 0, function () {
128
- var cliArgs, projectName, projectDir, template, packageManager, emitter, spinner, result;
128
+ var cliArgs, projectName, projectDir, template, packageManager, emitter, spinner, lockPath, result;
129
129
  return __generator(this, function (_a) {
130
130
  switch (_a.label) {
131
131
  case 0:
@@ -142,12 +142,21 @@ function createProject(args) {
142
142
  _a.label = 3;
143
143
  case 3:
144
144
  spinner = (0, ora_1.default)('Checking latest Payload version...').start();
145
- return [4 /*yield*/, updatePackageJSONName({ projectName: projectName, projectDir: projectDir })];
145
+ return [4 /*yield*/, updatePackageJSONName({ projectName: projectName, projectDir: projectDir })
146
+ // Remove yarn.lock file. This is only desired in Payload Cloud.
147
+ ];
146
148
  case 4:
147
149
  _a.sent();
150
+ lockPath = path_1.default.resolve(projectDir, 'yarn.lock');
151
+ if (!fs_extra_1.default.existsSync(lockPath)) return [3 /*break*/, 6];
152
+ return [4 /*yield*/, fs_extra_1.default.remove(lockPath)];
153
+ case 5:
154
+ _a.sent();
155
+ _a.label = 6;
156
+ case 6:
148
157
  spinner.text = 'Installing dependencies...';
149
158
  return [4 /*yield*/, installDeps({ cliArgs: cliArgs, projectDir: projectDir, packageManager: packageManager })];
150
- case 5:
159
+ case 7:
151
160
  result = _a.sent();
152
161
  spinner.stop();
153
162
  spinner.clear();
package/package.json CHANGED
@@ -37,7 +37,7 @@
37
37
  "prompts": "^2.4.2",
38
38
  "terminal-link": "^2.1.1"
39
39
  },
40
- "version": "0.4.1",
40
+ "version": "0.4.2",
41
41
  "devDependencies": {
42
42
  "@types/command-exists": "^1.2.0",
43
43
  "@types/degit": "^2.8.3",