From 507c0d67efa091b86fa309341919ddfc0e2852d9 Mon Sep 17 00:00:00 2001 From: Dave Berner Date: Mon, 6 Nov 2023 17:23:06 +1100 Subject: [PATCH 1/2] feat: add playground --- .gitignore | 1 + package.json | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 0b436ff..31ee7d3 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ node_modules dist .DS_Store coverage +playground diff --git a/package.json b/package.json index cb4ddf2..468fe2b 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,9 @@ "build:watch": "genversion --es6 src/utils/version.js && rollup -c -w", "test": "jest", "release": "release-it", - "lint": "eslint --ignore-path .eslintignore --ext .js" + "lint": "eslint --ignore-path .eslintignore --ext .js", + "dev:prepare": "rm -rf playground && git clone https://github.com/kinde-starter-kits/kinde-nextjs-app-router-starter-kit playground && npm link && cd playground && mv .env.local.sample .env.local && npm uninstall @kinde-oss/kinde-auth-nextjs && rm -rf .git && npm link @kinde-oss/kinde-auth-nextjs", + "dev": "cd playground && npm run dev" }, "author": { "name": "Kinde", From 105a44c0a52e02605dc4515e4b78a4314ed79f8c Mon Sep 17 00:00:00 2001 From: Dave Berner Date: Mon, 6 Nov 2023 17:27:11 +1100 Subject: [PATCH 2/2] chore: readme details on running the playground --- readme.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/readme.md b/readme.md index 6f959f3..6b75066 100644 --- a/readme.md +++ b/readme.md @@ -20,6 +20,16 @@ To publish a new package version, use the “Release and Publish to NPM” actio Please refer to Kinde’s [contributing guidelines](https://github.com/kinde-oss/.github/blob/489e2ca9c3307c2b2e098a885e22f2239116394a/CONTRIBUTING.md). +## Playground + +To create the playground run `npm run dev:prepare` + +This will clone the NextJS app router starter kit into a `/playground` directory and reference the SDK via `npm link`. + +You will need to add your Kinde credentials to the generated `.env.local` file inside `/playground` + +`npm run dev` will load up the playground on [http://localhost:3000](http://localhost:3000) + ## License By contributing to Kinde, you agree that your contributions will be licensed under its MIT License.