create-cloudflare 2.40.0 → 2.40.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-cloudflare",
3
- "version": "2.40.0",
3
+ "version": "2.40.1",
4
4
  "description": "A CLI for creating and deploying new applications to Cloudflare.",
5
5
  "keywords": [
6
6
  "cloudflare",
@@ -30,7 +30,7 @@
30
30
  "@babel/parser": "^7.21.3",
31
31
  "@babel/types": "^7.21.4",
32
32
  "@clack/prompts": "^0.6.3",
33
- "@cloudflare/workers-types": "^4.20250214.0",
33
+ "@cloudflare/workers-types": "^4.20250224.0",
34
34
  "@iarna/toml": "^3.0.0",
35
35
  "@types/command-exists": "^1.2.0",
36
36
  "@types/cross-spawn": "^6.0.2",
@@ -71,10 +71,11 @@
71
71
  "xdg-app-paths": "^8.3.0",
72
72
  "yargs": "^17.7.2",
73
73
  "@cloudflare/cli": "1.1.1",
74
- "@cloudflare/eslint-config-worker": "1.1.0",
75
- "wrangler": "3.112.0",
76
74
  "@cloudflare/mock-npm-registry": "0.0.0",
77
- "@cloudflare/workers-tsconfig": "0.0.0"
75
+ "@cloudflare/vite-plugin": "0.1.9",
76
+ "@cloudflare/workers-tsconfig": "0.0.0",
77
+ "@cloudflare/eslint-config-worker": "1.1.0",
78
+ "wrangler": "3.113.0"
78
79
  },
79
80
  "engines": {
80
81
  "node": ">=18.14.1"
@@ -1,29 +1,9 @@
1
- import { runFrameworkGenerator } from "frameworks/index";
2
- import { detectPackageManager } from "helpers/packageManagers";
3
- import type { TemplateConfig } from "../../src/templates";
4
- import type { C3Context } from "types";
1
+ import pages from "./pages/c3";
2
+ import workers from "./workers/c3";
3
+ import type { MultiPlatformTemplateConfig } from "../../src/templates";
5
4
 
6
- const { npm } = detectPackageManager();
7
-
8
- const generate = async (ctx: C3Context) => {
9
- await runFrameworkGenerator(ctx, [ctx.project.name, "classic"]);
10
- };
11
-
12
- const config: TemplateConfig = {
13
- configVersion: 1,
14
- id: "docusaurus",
15
- frameworkCli: "create-docusaurus",
16
- platform: "pages",
5
+ const config: MultiPlatformTemplateConfig = {
17
6
  displayName: "Docusaurus",
18
- generate,
19
- transformPackageJson: async () => ({
20
- scripts: {
21
- preview: `${npm} run build && wrangler pages dev ./build`,
22
- deploy: `${npm} run build && wrangler pages deploy ./build`,
23
- },
24
- }),
25
- devScript: "preview",
26
- deployScript: "deploy",
27
- previewScript: "preview",
7
+ platformVariants: { pages, workers },
28
8
  };
29
9
  export default config;
@@ -0,0 +1,30 @@
1
+ import { runFrameworkGenerator } from "frameworks/index";
2
+ import { detectPackageManager } from "helpers/packageManagers";
3
+ import type { TemplateConfig } from "../../../src/templates";
4
+ import type { C3Context } from "types";
5
+
6
+ const { npm } = detectPackageManager();
7
+
8
+ const generate = async (ctx: C3Context) => {
9
+ await runFrameworkGenerator(ctx, [ctx.project.name, "classic"]);
10
+ };
11
+
12
+ const config: TemplateConfig = {
13
+ configVersion: 1,
14
+ id: "docusaurus",
15
+ frameworkCli: "create-docusaurus",
16
+ platform: "pages",
17
+ displayName: "Docusaurus",
18
+ path: "templates/docusaurus/pages",
19
+ generate,
20
+ transformPackageJson: async () => ({
21
+ scripts: {
22
+ preview: `${npm} run build && wrangler pages dev ./build`,
23
+ deploy: `${npm} run build && wrangler pages deploy ./build`,
24
+ },
25
+ }),
26
+ devScript: "preview",
27
+ deployScript: "deploy",
28
+ previewScript: "preview",
29
+ };
30
+ export default config;
@@ -1,6 +1,6 @@
1
1
  import { runFrameworkGenerator } from "frameworks/index";
2
2
  import { detectPackageManager } from "helpers/packageManagers";
3
- import type { TemplateConfig } from "../../src/templates";
3
+ import type { TemplateConfig } from "../../../src/templates";
4
4
  import type { C3Context } from "types";
5
5
 
6
6
  const { npm } = detectPackageManager();
@@ -18,7 +18,7 @@ const config: TemplateConfig = {
18
18
  copyFiles: {
19
19
  path: "./templates",
20
20
  },
21
- path: "templates-experimental/docusaurus",
21
+ path: "templates/docusaurus/workers",
22
22
  generate,
23
23
  transformPackageJson: async () => ({
24
24
  scripts: {
@@ -7,12 +7,17 @@ worker without having to restart `wrangler`.
7
7
  ### Types and autocomplete
8
8
 
9
9
  This project also includes a pyproject.toml and uv.lock file with some requirements which
10
- set up autocomplete and type hints for this Python Workers project. To get these installed
11
- you can run the following:
10
+ set up autocomplete and type hints for this Python Workers project.
11
+
12
+ To get these installed you'll need `uv`, which you can install by following
13
+ https://docs.astral.sh/uv/getting-started/installation/.
14
+
15
+ Once `uv` is installed, you can run the following:
12
16
 
13
17
  ```
14
18
  uv venv
15
19
  uv sync
16
20
  ```
17
21
 
18
- Then point your editor's Python plugin at the `.venv` directory.
22
+ Then point your editor's Python plugin at the `.venv` directory. You should then have working
23
+ autocomplete and type information in your editor.