From e2e1da17bd1713cbf3f5c91e38fdb60d5519f3c6 Mon Sep 17 00:00:00 2001 From: josefaidt Date: Wed, 31 Mar 2021 15:05:45 -0500 Subject: [PATCH] begin to migrate to sk endpoints, vercel adapter --- package.json | 14 ++--- src/pages/$layout.svelte | 34 +++++++---- src/pages/api/spotify/_.js | 49 +++++++++++++++ .../api/spotify/currently-playing.json.js | 39 ++++++++++++ src/pages/posts/[slug].svelte | 2 + support/package.json | 1 + support/yarn.lock | 60 ++++++++++--------- svelte.config.cjs | 4 +- 8 files changed, 152 insertions(+), 51 deletions(-) create mode 100644 src/pages/api/spotify/_.js create mode 100644 src/pages/api/spotify/currently-playing.json.js diff --git a/package.json b/package.json index 3c77d6a..773b24f 100644 --- a/package.json +++ b/package.json @@ -5,11 +5,14 @@ "type": "module", "scripts": { "dev": "svelte-kit dev", - "vercel-dev": "yarn dev -p $PORT", "build": "node scripts/build.cjs", "start": "svelte-kit start" }, - "dependencies": {}, + "dependencies": { + "node-fetch": "^2.6.1", + "querystring": "^0.2.1", + "svelte-themer": "next" + }, "devDependencies": { "@babel/core": "^7.13.1", "@babel/preset-env": "^7.13.5", @@ -17,13 +20,7 @@ "@sveltejs/adapter-vercel": "next", "@sveltejs/kit": "next", "autoprefixer": "^10.2.4", - "express": "^4.17.1", - "express-graphql": "^0.12.0", - "front-matter": "^4.0.2", - "graphql": "^15.5.0", "graphql-request": "^3.4.0", - "graphql-tools": "^7.0.4", - "node-fetch": "^2.6.1", "postcss": "^8.2.6", "postcss-import": "^14.0.0", "prettier": "^2.1.2", @@ -31,7 +28,6 @@ "support": "./support", "svelte": "^3.29.0", "svelte-preprocess": "^4.6.6", - "svelte-themer": "next", "vercel": "^21.3.3", "vite": "^2.1.0" }, diff --git a/src/pages/$layout.svelte b/src/pages/$layout.svelte index a950084..7cffb5e 100644 --- a/src/pages/$layout.svelte +++ b/src/pages/$layout.svelte @@ -1,5 +1,15 @@