diff options
| author | Joe Carstairs <65492573+Sycamost@users.noreply.github.com> | 2023-08-07 20:46:07 +0100 |
|---|---|---|
| committer | Joe Carstairs <65492573+Sycamost@users.noreply.github.com> | 2023-08-07 20:50:17 +0100 |
| commit | 48f6b38c333fdaf57fe418c6e6a5fc4bfb928921 (patch) | |
| tree | 2f13763840bd55545b5ce7085517ce369dbf1bef | |
| parent | 1ec33f27f5bff2b96c80b954b53a62951b6cd354 (diff) | |
Pre-compiles api
| -rw-r--r-- | .gitignore | 2 | ||||
| -rw-r--r-- | api-src/Order.d.ts (renamed from api/Order.d.ts) | 0 | ||||
| -rw-r--r-- | api-src/_env.ts (renamed from api/_env.ts) | 0 | ||||
| -rw-r--r-- | api-src/_paypal.ts (renamed from api/_paypal.ts) | 0 | ||||
| -rw-r--r-- | api-src/createPaypalOrder.ts (renamed from api/createPaypalOrder.ts) | 0 | ||||
| -rw-r--r-- | api-src/tsconfig.json | 15 | ||||
| -rw-r--r-- | api/package.json | 3 | ||||
| -rw-r--r-- | package-lock.json | 1 | ||||
| -rw-r--r-- | package.json | 8 |
9 files changed, 26 insertions, 3 deletions
@@ -7,3 +7,5 @@ npm-debug.log* dist/ .astro/ .vercel +api/**/* +!api/package.json diff --git a/api/Order.d.ts b/api-src/Order.d.ts index cf1ff81..cf1ff81 100644 --- a/api/Order.d.ts +++ b/api-src/Order.d.ts diff --git a/api/_env.ts b/api-src/_env.ts index 69ed902..69ed902 100644 --- a/api/_env.ts +++ b/api-src/_env.ts diff --git a/api/_paypal.ts b/api-src/_paypal.ts index 348c972..348c972 100644 --- a/api/_paypal.ts +++ b/api-src/_paypal.ts diff --git a/api/createPaypalOrder.ts b/api-src/createPaypalOrder.ts index c0053d4..c0053d4 100644 --- a/api/createPaypalOrder.ts +++ b/api-src/createPaypalOrder.ts diff --git a/api-src/tsconfig.json b/api-src/tsconfig.json new file mode 100644 index 0000000..84d8095 --- /dev/null +++ b/api-src/tsconfig.json @@ -0,0 +1,15 @@ +{ + "strict": true, + "compilerOptions": { + "target": "ES5", + "module": "CommonJS", + "sourceMap": true, + "moduleResolution": "node", + "esModuleInterop": true, + "baseUrl": ".", + "outDir": "../api", + "lib": ["ESNext", "DOM"] + }, + "include": ["."], + "exclude": ["./node_modules"] +} diff --git a/api/package.json b/api/package.json new file mode 100644 index 0000000..c9a4422 --- /dev/null +++ b/api/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +}
\ No newline at end of file diff --git a/package-lock.json b/package-lock.json index cf320d5..3324f65 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,6 +7,7 @@ "dependencies": { "astro": "^2.9.7", "dotenv": "^16.3.1", + "typescript": "^5.1.6", "vercel": "^31.2.2" }, "devDependencies": { diff --git a/package.json b/package.json index a9ec215..31f160b 100644 --- a/package.json +++ b/package.json @@ -2,9 +2,10 @@ "type": "module", "private": "true", "scripts": { - "dev": "astro dev", - "start": "astro dev", - "build": "astro build", + "dev": "npm run build-api && astro dev", + "start": "npm run build-api && astro dev", + "build": "npm run build-api && astro build", + "build-api": "cd api-src && npx tsc", "preview": "astro preview", "astro": "astro", "lint": "eslint .", @@ -15,6 +16,7 @@ "dependencies": { "astro": "^2.9.7", "dotenv": "^16.3.1", + "typescript": "^5.1.6", "vercel": "^31.2.2" }, "devDependencies": { |
