Skip to content

Commit cf79faa

Browse files
committed
Improve the TS support
1 parent 66f17ad commit cf79faa

File tree

8 files changed

+3920
-139
lines changed

8 files changed

+3920
-139
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,6 @@ typings/
6565

6666
# tdsx
6767
dist
68+
69+
packages/typescriptlang-org/schema.json
70+
packages/typescriptlang-org/apollo.config.js

packages/typescriptlang-org/__generated__/globalTypes.d.ts

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/typescriptlang-org/bootup/onCreateNode.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ const { createFilePath } = require(`gatsby-source-filesystem`)
22

33
const onCreateNode = ({ node, actions, getNode }) => {
44
const { createNodeField } = actions
5-
console.log("Creating node: ")
6-
console.log(node)
75

86
if (node.internal.type === `MarkdownRemark`) {
97
const value = createFilePath({ node, getNode })
Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,35 @@
11
module.exports = {
22
plugins: [
3-
`gatsby-plugin-typescript`,
4-
{
5-
resolve: `gatsby-source-filesystem`,
6-
options: {
7-
path: `${__dirname}/../handbook-v1/en`,
8-
name: `handbook-v1`,
3+
"gatsby-plugin-codegen",
4+
`gatsby-plugin-typescript`,
5+
{
6+
resolve: `gatsby-source-filesystem`,
7+
options: {
8+
path: `${__dirname}/../handbook-v1/en`,
9+
name: `handbook-v1`,
10+
},
911
},
10-
},
11-
{
12-
resolve: `gatsby-transformer-remark`,
13-
options: {
14-
plugins: [
15-
{
16-
resolve: `gatsby-remark-images`,
17-
options: {
18-
maxWidth: 590,
12+
{
13+
resolve: `gatsby-transformer-remark`,
14+
options: {
15+
plugins: [
16+
{
17+
resolve: `gatsby-remark-images`,
18+
options: {
19+
maxWidth: 590,
20+
},
1921
},
20-
},
21-
{
22-
resolve: `gatsby-remark-responsive-iframe`,
23-
options: {
24-
wrapperStyle: `margin-bottom: 1.0725rem`,
22+
{
23+
resolve: `gatsby-remark-responsive-iframe`,
24+
options: {
25+
wrapperStyle: `margin-bottom: 1.0725rem`,
26+
},
2527
},
26-
},
27-
`gatsby-remark-prismjs`,
28-
`gatsby-remark-copy-linked-files`,
29-
`gatsby-remark-smartypants`,
30-
],
28+
`gatsby-remark-prismjs`,
29+
`gatsby-remark-copy-linked-files`,
30+
`gatsby-remark-smartypants`,
31+
],
32+
},
3133
},
32-
},
33-
]
34+
],
3435
}

packages/typescriptlang-org/package.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,20 @@
1515
"@uifabric/fluent-theme": "^0.16.7",
1616
"@uifabric/react-cards": "^0.107.6",
1717
"gatsby": "^2.4.0",
18+
"gatsby-plugin-codegen": "^1.0.4",
19+
"gatsby-plugin-sharp": "^2.2.28",
20+
"gatsby-remark-copy-linked-files": "^2.1.24",
21+
"gatsby-remark-images": "^3.1.25",
22+
"gatsby-remark-prismjs": "^3.3.17",
23+
"gatsby-remark-responsive-iframe": "^2.2.21",
24+
"gatsby-remark-smartypants": "^2.1.11",
25+
"gatsby-source-filesystem": "^2.1.29",
26+
"gatsby-transformer-remark": "^2.6.27",
1827
"office-ui-fabric-react": "^6.176.0",
28+
"prismjs": "^1.17.1",
1929
"react": "^16.8.6",
20-
"react-dom": "^16.8.6"
30+
"react-dom": "^16.8.6",
31+
"ts-node": "^8.4.1"
2132
},
2233
"devDependencies": {
2334
"@types/react": "^16.9.2",

packages/typescriptlang-org/src/templates/__generated__/BlogPostBySlug.d.ts

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)