Skip to content

Commit

Permalink
Merge pull request #264 from contentlayerdev/feat/stackbit-source
Browse files Browse the repository at this point in the history
experimental-source-files-stackbit
  • Loading branch information
schickling authored Jul 8, 2022
2 parents 4618dd5 + 5530019 commit ef3cbf3
Show file tree
Hide file tree
Showing 40 changed files with 882 additions and 52 deletions.
2 changes: 1 addition & 1 deletion examples/archive/playground-azimuth-colocated/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
"contentlayer": "workspace:*",
"contentlayer-stackbit-yaml-generator": "workspace:*",
"next-contentlayer": "workspace:*",
"typescript": "^4.6.4"
"typescript": "^4.7.4"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
"contentlayer": "workspace:*",
"contentlayer-stackbit-yaml-generator": "workspace:*",
"next-contentlayer": "workspace:*",
"typescript": "^4.6.4"
"typescript": "^4.7.4"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
"@types/react": "^18.0.9",
"@types/react-dom": "^18.0.3",
"@types/react-helmet": "^6.1.5",
"typescript": "^4.6.4"
"typescript": "^4.7.4"
}
}
2 changes: 1 addition & 1 deletion examples/archive/playground-azimuth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
"contentlayer": "workspace:*",
"contentlayer-stackbit-yaml-generator": "workspace:*",
"next-contentlayer": "workspace:*",
"typescript": "^4.6.4"
"typescript": "^4.7.4"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
"contentlayer": "latest",
"next-contentlayer": "latest",
"rehype-highlight": "^5.0.2",
"typescript": "^4.6.4"
"typescript": "^4.7.4"
}
}
2 changes: 1 addition & 1 deletion examples/archive/starter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
"contentlayer": "latest",
"next-contentlayer": "latest",
"rehype-highlight": "^5.0.2",
"typescript": "^4.6.4"
"typescript": "^4.7.4"
}
}
2 changes: 1 addition & 1 deletion examples/next-contentlayer-example
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"eslint-plugin-simple-import-sort": "^7.0.0",
"prettier": "^2.6.2",
"ts-patch": "^2.0.1",
"typescript": "^4.6.4"
"typescript": "^4.7.4"
},
"resolutions": {
"esbuild": "0.14.38",
Expand Down
2 changes: 1 addition & 1 deletion packages/@contentlayer/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@contentlayer/cli",
"version": "0.2.6-dev.9",
"version": "0.2.7-dev.6",
"type": "module",
"exports": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/@contentlayer/client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@contentlayer/client",
"version": "0.2.6-dev.9",
"version": "0.2.7-dev.6",
"type": "module",
"exports": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/@contentlayer/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@contentlayer/core",
"version": "0.2.6-dev.9",
"version": "0.2.7-dev.6",
"type": "module",
"exports": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
12 changes: 10 additions & 2 deletions packages/@contentlayer/core/src/gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,16 @@ export type GetFieldNamesForDefinitionGen<DefName extends string> =
: keyof GetNestedTypeGen<DefName>

declare global {
// NOTE will be extended via `node_modules/@types/contentlayer/types/index.d.ts`
interface ContentlayerGen {}
// NOTE will be extended via `$YOUR_PROJECT/.contentlayer/generated/types.d.ts`
interface ContentlayerGen {
// documentTypes: DocumentTypes
// documentTypeMap: DocumentTypeMap
// documentTypeNames: DocumentTypeNames
// nestedTypes: NestedTypes
// nestedTypeMap: NestedTypeMap
// nestedTypeNames: NestedTypeNames
// allTypeNames: AllTypeNames
}
}

export type CacheGen = Omit<DataCache.Cache, 'documents'> & { documents: DocumentGen[] }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"name": "@contentlayer/experimental-source-files-stackbit",
"version": "0.2.7-dev.6",
"type": "module",
"exports": {
".": {
"import": "./dist/index.js"
}
},
"types": "./dist/index.d.ts",
"files": [
"./dist/*.{js,ts,map}",
"./dist/!(__test__)/**/*.{js,ts,map}",
"./src",
"./package.json"
],
"scripts": {
"test": "TZ='GMT' FORCE_COLOR=1 vitest"
},
"peerDependencies": {
"@stackbit/sdk": "~0.2.34"
},
"peerDependenciesMeta": {
"@stackbit/sdk": {
"optional": true
}
},
"dependencies": {
"@contentlayer/core": "workspace:*",
"@contentlayer/source-files": "workspace:*",
"@contentlayer/utils": "workspace:*",
"@stackbit/sdk": "~0.2.34"
},
"devDependencies": {
"vite": "^2.9.8",
"vitest": "^0.12.4"
}
}
Loading

0 comments on commit ef3cbf3

Please sign in to comment.