-
Notifications
You must be signed in to change notification settings - Fork 711
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
C3-workers-assets-experimental-templates (#6678)
* feat: add --experimental flag to allow access to experimental templates * fix: do not crash if the chosen framework does not exist * fix: offer to deploy workers with assets and no bindings * feat: add experimental qwik workers + assets template * feat: add experimental svelte workers + assets template * feat: add experimental remix workers + assets template * feat: add experimental astro workers + assets template * feat: add hello world with assets template * feat: add experimental solid workers + assets template * feat: add experimental nuxt workers + assets template * feat: filter the C3 help info when in experimental mode * fix: mark new Workers + Assets experimental templates as "workers" platform This avoids C3 from trying to create a Pages project for them. Needed a bit of refactoring to ensure that these new templates still work even if not marked as "pages". * feat: add experimental angular workers + assets template * refactor: use mapped paths to import templates * feat: add experimental docusaurus workers + assets template * feat: add experimental gatsby workers + assets template * add changesets
- Loading branch information
1 parent
85caaf2
commit 40ecf47
Showing
104 changed files
with
2,750 additions
and
204 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"create-cloudflare": patch | ||
--- | ||
|
||
fix: do not crash if the chosen framework does not exist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"create-cloudflare": minor | ||
--- | ||
|
||
feat: add experimental mode and associated workers + assets templates |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,22 @@ | ||
import { frameworkCliMap } from "../src/frameworks/package.json"; | ||
import { getFrameworkMap } from "../src/templates"; | ||
|
||
let targetFramework = undefined; | ||
|
||
const envCliToTest = process.env.FRAMEWORK_CLI_TO_TEST; | ||
/** | ||
* Get the name of the framework to test or undefined if not focussing on a single framework. | ||
*/ | ||
export function getFrameworkToTest({ experimental = false }) { | ||
const envCliToTest = process.env.FRAMEWORK_CLI_TO_TEST; | ||
if (!envCliToTest) { | ||
return undefined; | ||
} | ||
|
||
if (envCliToTest) { | ||
for (const [framework, cli] of Object.entries(frameworkCliMap)) { | ||
if (cli === envCliToTest) { | ||
targetFramework = framework; | ||
const frameworks = getFrameworkMap({ experimental }); | ||
for (const [framework, { frameworkCli }] of Object.entries(frameworks)) { | ||
if (frameworkCli === envCliToTest) { | ||
return framework; | ||
} | ||
} | ||
if (!targetFramework) { | ||
throw new Error( | ||
`Specified cli doesn't exist in framework map: ${envCliToTest}`, | ||
); | ||
} | ||
} | ||
|
||
/** | ||
* In case the e2e run is supposed to only test a single framework | ||
* the framework's name is set as the value of this variable, for standard | ||
* runs this variable's value is `undefined` | ||
*/ | ||
export const frameworkToTest = targetFramework; | ||
throw new Error( | ||
`Specified cli doesn't exist in framework map: ${envCliToTest}`, | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "../../tsconfig.json" | ||
} |
Oops, something went wrong.