Skip to content

Commit a1c215b

Browse files
committed
feat(gatsby-plugin-clerk): Introduce basic structure
1 parent 56bef6f commit a1c215b

11 files changed

+112
-3
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,5 @@ Thumbs.db
4949

5050
.turbo
5151

52-
lerna-debug.log
52+
lerna-debug.log
53+
playground
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('./dist/gatsby-browser');
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('./dist/gatsby-node');
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('./dist/gatsby-ssr');

packages/gatsby-plugin-clerk/index.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/**
2+
* noop
3+
*
4+
* This is a Gatsby plugin, so a default export is not needed.
5+
* Gatsby will import and use the config files automatically
6+
*
7+
* For more info, take a look at the official Gatsby docs:
8+
* https://www.gatsbyjs.com/docs/plugins/
9+
*/
+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"name": "gatsby-plugin-clerk",
3+
"version": "3.0.0-alpha,0",
4+
"license": "MIT",
5+
"description": "Clerk.dev SDK for Gatsby",
6+
"keywords": [
7+
"clerk",
8+
"clerk.dev",
9+
"gatsby",
10+
"gatsby-plugin",
11+
"gatsby-plugin-clerk",
12+
"auth",
13+
"authentication",
14+
"user management"
15+
],
16+
"author": "Clerk",
17+
"main": "dist/index.js",
18+
"typings": "dist/index.d.ts",
19+
"files": [
20+
"dist",
21+
"src",
22+
"gatsby-browser.js",
23+
"gatsby-ssr.js",
24+
"gatsby-node.js",
25+
"ssr.js",
26+
"ssr.d.ts"
27+
],
28+
"scripts": {
29+
"prepublishOnly": "npm run build",
30+
"build": "tsc -p tsconfig.build.json",
31+
"dev": "tsc -p tsconfig.build.json --watch"
32+
},
33+
"dependencies": {
34+
"@clerk/clerk-react": "^3.2.4",
35+
"@clerk/clerk-sdk-node": "^3.3.2",
36+
"@clerk/types": "^2.5.0",
37+
"cookie": "^0.5.0",
38+
"tslib": "^2.3.1"
39+
},
40+
"devDependencies": {
41+
"@types/cookie": "^0.5.0",
42+
"@types/node": "^16.11.9",
43+
"typescript": "^4.6.2"
44+
},
45+
"peerDependencies": {
46+
"gatsby": "^4.0.0"
47+
},
48+
"engines": {
49+
"node": ">=16"
50+
},
51+
"publishConfig": {
52+
"access": "public"
53+
},
54+
"repository": {
55+
"type": "git",
56+
"url": "https://github.com/clerkinc/javascript.git"
57+
},
58+
"bugs": {
59+
"url": "https://github.com/clerkinc/javascript/issues"
60+
},
61+
"homepage": "https://clerk.dev/"
62+
}

packages/gatsby-plugin-clerk/ssr.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './dist/ssr';

packages/gatsby-plugin-clerk/ssr.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('./dist/ssr');
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"compilerOptions": {
3+
"outDir": "dist",
4+
"baseUrl": ".",
5+
"lib": ["es6", "dom"],
6+
"jsx": "react",
7+
"module": "commonjs",
8+
"moduleResolution": "node",
9+
"importHelpers": true,
10+
"declaration": true,
11+
"declarationMap": true,
12+
"noImplicitReturns": true,
13+
"noUnusedLocals": true,
14+
"noUnusedParameters": true,
15+
"resolveJsonModule": true,
16+
"sourceMap": true,
17+
"strict": true,
18+
"types": [],
19+
"esModuleInterop": true,
20+
"skipLibCheck": true,
21+
"allowJs": true,
22+
"target": "ES2019",
23+
"noEmitOnError": false
24+
},
25+
"include": ["src"]
26+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "./tsconfig.build.json",
3+
"compilerOptions": {
4+
"incremental": true
5+
}
6+
}

packages/remix/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@
3535
"@clerk/clerk-react": "^3.2.6",
3636
"@clerk/clerk-sdk-node": "^3.3.4",
3737
"@clerk/types": "^2.6.0",
38-
"cookie": "^0.4.2",
38+
"cookie": "^0.5.0",
3939
"tslib": "^2.3.1"
4040
},
4141
"devDependencies": {
42-
"@types/cookie": "^0.4.1",
42+
"@types/cookie": "^0.5.0",
4343
"@types/jest": "^27.4.0",
4444
"@types/node": "^16.11.9",
4545
"@types/react": "^17.0.39",

0 commit comments

Comments
 (0)