Skip to content

Commit

Permalink
add mdx example
Browse files Browse the repository at this point in the history
MDX example to validate regression of [#117]

[#117]: #117
  • Loading branch information
cometkim committed Jun 12, 2022
1 parent 68798df commit fac37d9
Show file tree
Hide file tree
Showing 21 changed files with 32,756 additions and 96 deletions.
12 changes: 3 additions & 9 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
/.yarn/releases/** linguist-vendored
/.yarn/plugins/** linguist-vendored
/.yarn/cache/** linguist-vendored
/.yarn/sdks/** linguist-vendored
/.yarn/pnpify/** linguist-vendored

/.pnp.js binary linguist-generated
/.pnp.cjs binary linguist-generated
/.yarn/** linguist-vendored
/.pnp.* binary linguist-generated

/.vscode/*.json linguist-language=JSON5

__generated__ linguist-generated
**/__generated__/** linguist-generated
2 changes: 2 additions & 0 deletions examples/mdx/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
public/
.cache/
37 changes: 37 additions & 0 deletions examples/mdx/gatsby-config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import type { GatsbyConfig } from 'gatsby';

const config: GatsbyConfig = {
siteMetadata: {
title: 'gatsby-plugin-typegen example',
description: 'gatsby-plugin-typegen example with TypeScript',
},
plugins: [
'gatsby-plugin-react-helmet-async',
'gatsby-plugin-image',
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'images',
path: 'src/images',
},
},
'gatsby-transformer-sharp',
'gatsby-plugin-sharp',
'gatsby-plugin-mdx',
{
resolve: 'gatsby-plugin-typegen',
options: {
outputPath: 'src/__generated__/gatsby-types.d.ts',
emitSchema: {
'src/__generated__/gatsby-introspection.json': true,
'src/__generated__/gatsby-schema.graphql': true,
},
emitPluginDocument: {
'src/__generated__/gatsby-plugin-documents.graphql': true,
},
},
},
],
};

export default config;
Empty file added examples/mdx/gatsby-node.js
Empty file.
36 changes: 36 additions & 0 deletions examples/mdx/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "example-mdx",
"private": true,
"description": "gatsby-plugin-typegen example with MDX",
"version": "0.1.0",
"author": {
"name": "Hyeseong Kim",
"email": "[email protected]"
},
"scripts": {
"build": "gatsby build",
"develop": "gatsby develop",
"serve": "gatsby serve",
"clean": "gatsby clean"
},
"dependencies": {
"@mdx-js/mdx": "v1",
"@mdx-js/react": "v1",
"gatsby": "^4.9.3",
"gatsby-plugin-image": "^2.9.1",
"gatsby-plugin-mdx": "^3.16.1",
"gatsby-plugin-react-helmet": "^5.9.0",
"gatsby-plugin-react-helmet-async": "^1.2.1",
"gatsby-plugin-sharp": "^4.9.1",
"gatsby-plugin-typegen": "portal:../../plugin",
"gatsby-source-filesystem": "^4.9.1",
"gatsby-transformer-sharp": "^4.9.0",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-helmet-async": "^1.2.3"
},
"devDependencies": {
"@types/react": "^17.0.40",
"typescript": "^4.6.2"
}
}
Loading

0 comments on commit fac37d9

Please sign in to comment.