Skip to content

Commit

Permalink
feat: Add initial project files and configurations
Browse files Browse the repository at this point in the history
- Add .npmrc file with engine-strict=true
- Add README.md with D1 example description
- Add src/lib/index.ts file for importing files through the `$lib` alias
- Add vite.config.ts file with sveltekit plugin configuration
- Add src/routes/+page.svelte file with SvelteKit welcome message
- Add .gitignore file with common ignore patterns
- Add src/worker-configuration.d.ts file for D1 database binding
- Add wrangler.toml file with D1 database configuration
- Add src/app.html file with basic HTML structure
- Add src/routes/server/+server.ts file with GET request handler
- Add src/app.d.ts file with global types for D1 database
- Add svelte.config.js file with adapter and platform proxy configuration
- Add tsconfig.json file with TypeScript compiler options
- Add package.json file with project dependencies and scripts
  • Loading branch information
Harold-Anderson committed Oct 24, 2024
0 parents commit c2eca1b
Show file tree
Hide file tree
Showing 17 changed files with 1,930 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
node_modules

# Output
.output
.vercel
/.svelte-kit
/build
.wrangler

# OS
.DS_Store
Thumbs.db

# Env
.env
.env.*
!.env.example
!.env.test
.dev.vars

# Vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# D1 example
Shows how to query a D1 database in Cloudflare Pages
26 changes: 26 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "d1-test",
"version": "0.0.1",
"type": "module",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
},
"devDependencies": {
"@sveltejs/adapter-auto": "^3.3.0",
"@sveltejs/kit": "^2.7.2",
"@sveltejs/vite-plugin-svelte": "^4.0.0",
"svelte": "^5.1.0",
"svelte-check": "^4.0.5",
"typescript": "^5.6.3",
"vite": "^5.4.10"
},
"dependencies": {
"@cloudflare/workers-types": "^4.20241022.0",
"@sveltejs/adapter-cloudflare": "^4.7.3",
"wrangler": "^3.83.0"
}
}
Loading

0 comments on commit c2eca1b

Please sign in to comment.