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", 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.