Initialize web application via create-cloudflare CLI
Details: C3 = create-cloudflare@2.54.1 project name = minecraft-website framework = next framework cli = create-next-app@15.4.6 package manager = npm@11.6.2 wrangler = wrangler@4.45.3 git = 2.51.1
This commit is contained in:
parent
c0f96e0424
commit
a1c0a4aed9
22
.gitignore
vendored
22
.gitignore
vendored
@ -3,12 +3,8 @@
|
|||||||
# dependencies
|
# dependencies
|
||||||
/node_modules
|
/node_modules
|
||||||
/.pnp
|
/.pnp
|
||||||
.pnp.*
|
.pnp.js
|
||||||
.yarn/*
|
.yarn/install-state.gz
|
||||||
!.yarn/patches
|
|
||||||
!.yarn/plugins
|
|
||||||
!.yarn/releases
|
|
||||||
!.yarn/versions
|
|
||||||
|
|
||||||
# testing
|
# testing
|
||||||
/coverage
|
/coverage
|
||||||
@ -28,10 +24,9 @@
|
|||||||
npm-debug.log*
|
npm-debug.log*
|
||||||
yarn-debug.log*
|
yarn-debug.log*
|
||||||
yarn-error.log*
|
yarn-error.log*
|
||||||
.pnpm-debug.log*
|
|
||||||
|
|
||||||
# env files (can opt-in for committing if needed)
|
# local env files
|
||||||
.env*
|
.env*.local
|
||||||
|
|
||||||
# vercel
|
# vercel
|
||||||
.vercel
|
.vercel
|
||||||
@ -39,3 +34,12 @@ yarn-error.log*
|
|||||||
# typescript
|
# typescript
|
||||||
*.tsbuildinfo
|
*.tsbuildinfo
|
||||||
next-env.d.ts
|
next-env.d.ts
|
||||||
|
|
||||||
|
# OpenNext
|
||||||
|
/.open-next
|
||||||
|
|
||||||
|
# wrangler files
|
||||||
|
.wrangler
|
||||||
|
.dev.vars*
|
||||||
|
!.dev.vars.example
|
||||||
|
!.env.example
|
||||||
|
|||||||
5
.vscode/settings.json
vendored
Normal file
5
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"files.associations": {
|
||||||
|
"wrangler.json": "jsonc"
|
||||||
|
}
|
||||||
|
}
|
||||||
8372
cloudflare-env.d.ts
vendored
Normal file
8372
cloudflare-env.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@ -5,3 +5,7 @@ const nextConfig: NextConfig = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default nextConfig;
|
export default nextConfig;
|
||||||
|
|
||||||
|
// added by create cloudflare to enable calling `getCloudflareContext()` in `next dev`
|
||||||
|
import { initOpenNextCloudflareForDev } from '@opennextjs/cloudflare';
|
||||||
|
initOpenNextCloudflareForDev();
|
||||||
|
|||||||
9
open-next.config.ts
Normal file
9
open-next.config.ts
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import { defineCloudflareConfig } from "@opennextjs/cloudflare";
|
||||||
|
|
||||||
|
export default defineCloudflareConfig({
|
||||||
|
// Uncomment to enable R2 cache,
|
||||||
|
// It should be imported as:
|
||||||
|
// `import r2IncrementalCache from "@opennextjs/cloudflare/overrides/incremental-cache/r2-incremental-cache";`
|
||||||
|
// See https://opennext.js.org/cloudflare/caching for more details
|
||||||
|
// incrementalCache: r2IncrementalCache,
|
||||||
|
});
|
||||||
24634
package-lock.json
generated
24634
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
57
package.json
57
package.json
@ -1,27 +1,32 @@
|
|||||||
{
|
{
|
||||||
"name": "minecraft-website",
|
"name": "minecraft-website",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev --turbopack",
|
"dev": "next dev --turbopack",
|
||||||
"build": "next build",
|
"build": "next build",
|
||||||
"start": "next start",
|
"start": "next start",
|
||||||
"lint": "next lint"
|
"lint": "next lint",
|
||||||
},
|
"deploy": "opennextjs-cloudflare build && opennextjs-cloudflare deploy",
|
||||||
"dependencies": {
|
"preview": "opennextjs-cloudflare build && opennextjs-cloudflare preview",
|
||||||
"react": "19.1.0",
|
"cf-typegen": "wrangler types --env-interface CloudflareEnv ./cloudflare-env.d.ts"
|
||||||
"react-dom": "19.1.0",
|
},
|
||||||
"next": "15.4.6"
|
"dependencies": {
|
||||||
},
|
"@opennextjs/cloudflare": "^1.3.0",
|
||||||
"devDependencies": {
|
"next": "15.4.6",
|
||||||
"typescript": "^5",
|
"react": "19.1.0",
|
||||||
"@types/node": "^20",
|
"react-dom": "19.1.0"
|
||||||
"@types/react": "^19",
|
},
|
||||||
"@types/react-dom": "^19",
|
"devDependencies": {
|
||||||
"@tailwindcss/postcss": "^4",
|
"@eslint/eslintrc": "^3",
|
||||||
"tailwindcss": "^4",
|
"@tailwindcss/postcss": "^4",
|
||||||
"eslint": "^9",
|
"@types/node": "^20.19.24",
|
||||||
"eslint-config-next": "15.4.6",
|
"@types/react": "^19",
|
||||||
"@eslint/eslintrc": "^3"
|
"@types/react-dom": "^19",
|
||||||
}
|
"eslint": "^9",
|
||||||
}
|
"eslint-config-next": "15.4.6",
|
||||||
|
"tailwindcss": "^4",
|
||||||
|
"typescript": "^5",
|
||||||
|
"wrangler": "^4.45.3"
|
||||||
|
}
|
||||||
|
}
|
||||||
3
public/_headers
Normal file
3
public/_headers
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# https://developers.cloudflare.com/workers/static-assets/headers
|
||||||
|
/_next/static/*
|
||||||
|
Cache-Control: public,max-age=31536000,immutable
|
||||||
@ -20,7 +20,11 @@
|
|||||||
],
|
],
|
||||||
"paths": {
|
"paths": {
|
||||||
"@/*": ["./src/*"]
|
"@/*": ["./src/*"]
|
||||||
}
|
},
|
||||||
|
"types": [
|
||||||
|
"./cloudflare-env.d.ts",
|
||||||
|
"node"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
||||||
"exclude": ["node_modules"]
|
"exclude": ["node_modules"]
|
||||||
|
|||||||
51
wrangler.jsonc
Normal file
51
wrangler.jsonc
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
/**
|
||||||
|
* For more details on how to configure Wrangler, refer to:
|
||||||
|
* https://developers.cloudflare.com/workers/wrangler/configuration/
|
||||||
|
*/
|
||||||
|
{
|
||||||
|
"$schema": "node_modules/wrangler/config-schema.json",
|
||||||
|
"name": "minecraft-website",
|
||||||
|
"main": ".open-next/worker.js",
|
||||||
|
"compatibility_date": "2025-03-01",
|
||||||
|
"compatibility_flags": [
|
||||||
|
"nodejs_compat",
|
||||||
|
"global_fetch_strictly_public"
|
||||||
|
],
|
||||||
|
"assets": {
|
||||||
|
"binding": "ASSETS",
|
||||||
|
"directory": ".open-next/assets"
|
||||||
|
},
|
||||||
|
"observability": {
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Smart Placement
|
||||||
|
* Docs: https://developers.cloudflare.com/workers/configuration/smart-placement/#smart-placement
|
||||||
|
*/
|
||||||
|
// "placement": { "mode": "smart" }
|
||||||
|
/**
|
||||||
|
* Bindings
|
||||||
|
* Bindings allow your Worker to interact with resources on the Cloudflare Developer Platform, including
|
||||||
|
* databases, object storage, AI inference, real-time communication and more.
|
||||||
|
* https://developers.cloudflare.com/workers/runtime-apis/bindings/
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* Environment Variables
|
||||||
|
* https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables
|
||||||
|
*/
|
||||||
|
// "vars": { "MY_VARIABLE": "production_value" }
|
||||||
|
/**
|
||||||
|
* Note: Use secrets to store sensitive data.
|
||||||
|
* https://developers.cloudflare.com/workers/configuration/secrets/
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* Static Assets
|
||||||
|
* https://developers.cloudflare.com/workers/static-assets/binding/
|
||||||
|
*/
|
||||||
|
// "assets": { "directory": "./public/", "binding": "ASSETS" }
|
||||||
|
/**
|
||||||
|
* Service Bindings (communicate between multiple Workers)
|
||||||
|
* https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings
|
||||||
|
*/
|
||||||
|
// "services": [{ "binding": "MY_SERVICE", "service": "my-service" }]
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user