Skip to content

Commit

Permalink
Merge pull request #325 from pantheon-systems/PCC-1778-remove-turbo-j…
Browse files Browse the repository at this point in the history
…son-file-from-starter-kit-upon-init-if-npm-or-yarn-is-used

[PCC-1778] remove turbo json file from starter kit upon init
  • Loading branch information
kevinstubbs authored Dec 10, 2024
2 parents 6e45b6d + 8c47810 commit 5104a09
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .changeset/ten-cats-swim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@pantheon-systems/pcc-cli": minor
---

No longer download turbo.json when initializing a new project from the starter
kit.
1 change: 0 additions & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"license": "MIT",
"keywords": [
"pcc",
"gatsby",
"nextjs",
"react",
"pantheon"
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/cli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ yargs(hideBin(process.argv))
.option("template", {
describe: "Template from which files should be copied.",
type: "string",
choices: ["nextjs", "gatsby", "vue"],
choices: ["nextjs"],
default: "nextjs",
demandOption: true,
})
Expand Down
5 changes: 4 additions & 1 deletion packages/cli/src/lib/downloadTemplateDirectory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ export async function downloadTemplateDirectory(
printVerbose?: boolean,
) {
try {
const files = await fetchFiles(directory, printVerbose);
// Fetch files but ignore certain ones.
const files = (await fetchFiles(directory, printVerbose)).filter(
(file) => !["turbo.json"].includes(file.path),
);

await Promise.all(files.map((file) => output(file, outputDirectory)));

Expand Down

0 comments on commit 5104a09

Please sign in to comment.