Skip to content

Commit

Permalink
[Pages] Move functions into src folder (#15)
Browse files Browse the repository at this point in the history
* [Pages] Move functions into src folder
* tsconfig updates
  • Loading branch information
MNThomson authored Jan 16, 2023
1 parent e8a7f51 commit 6bb3e47
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 9 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
"version": "0.0.1",
"private": true,
"scripts": {
"dev:a": "PUBLIC_GIT_SHA=$(git rev-parse --short HEAD) astro dev",
"dev:cf": "( sleep 10 && curl http://localhost:8788/v2/seed ) & PUBLIC_GIT_SHA=$(git rev-parse --short HEAD) wrangler pages dev --compatibility-date=2023-01-12 --kv containerFlareKV --r2 containerFlareR2 --binding $(cat .env) -- astro dev #--proxy 3000",
"preview": "npm run build && rm functions/[[path]].js && wrangler pages dev dist/ --compatibility-date=2023-01-12 --kv containerFlareKV --r2 containerFlareR2 --binding $(cat .env)",
"build": "PUBLIC_GIT_SHA=$(git rev-parse --short HEAD) astro build",
"publish": "npm run build && rm functions/[[path]].js && npx wrangler pages publish --branch main dist/",
"dev:a": "astro dev",
"dev:cf": "( sleep 10 && curl http://localhost:8788/v2/seed ) & cd ./src && wrangler pages dev --compatibility-date=2023-01-12 --kv containerFlareKV --r2 containerFlareR2 --binding $(cat ../.env) -- npm run --prefix ../ dev:a",
"preview": "npm run build && cd ./src && wrangler pages dev ../dist --compatibility-date=2023-01-12 --kv containerFlareKV --r2 containerFlareR2 --binding $(cat ../.env) ",
"build": "astro build && rm -rf ./functions",
"publish": "npm run build && cd ./src && wrangler pages publish ../dist #--branch main",
"astro": "astro",
"--Oberservability": "---------------------------------------------------------",
"logs:preview": "wrangler pages deployment tail --project-name containerflare --environment preview",
Expand Down
2 changes: 1 addition & 1 deletion functions/tsconfig.json → src/functions/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {
import {
EventContext,
PagesFunction,
Response,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {
import {
EventContext,
PagesFunction,
Response,
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion src/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"extends": "../tsconfig.json",
"extends": "../tsconfig.base.json",
"exclude": ["./functions"],
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
Expand Down
File renamed without changes.

0 comments on commit 6bb3e47

Please sign in to comment.