Skip to content

Commit

Permalink
chore(ts): convert api-node-docs to ts
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrieluizramos committed May 2, 2020
1 parent 546e5e5 commit f908db5
Show file tree
Hide file tree
Showing 4 changed files with 421 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/docs/node-apis.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Gatsby Node APIs
description: Documentation on Node APIs used in Gatsby build process for common uses like creating pages
jsdoc: ["gatsby/src/utils/api-node-docs.js"]
jsdoc: ["gatsby/src/utils/api-node-docs.ts"]
apiCalls: NodeAPI
---

Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby/scripts/output-api-file.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ async function outputFile() {
const apis = await Promise.all([
path.join('cache-dir', 'api-ssr-docs.js'),
path.join('src', 'utils', 'api-browser-docs.ts'),
path.join('src', 'utils', 'api-node-docs.js')
path.join('src', 'utils', 'api-node-docs.ts')
]
.map(filePath => {
const resolved = path.resolve(filePath)
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby/src/bootstrap/load-plugins/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const _ = require(`lodash`)

const { store } = require(`../../redux`)
const nodeAPIs = require(`../../utils/api-node-docs`)
import * as nodeAPIs from "../../utils/api-node-docs"
import * as browserAPIs from "../../utils/api-browser-docs"
const ssrAPIs = require(`../../../cache-dir/api-ssr-docs`)
const { loadPlugins } = require(`./load`)
Expand Down
Loading

0 comments on commit f908db5

Please sign in to comment.