Skip to content

Commit

Permalink
Generate types before build
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorblades committed Mar 25, 2019
1 parent 1915eda commit 0da2b1e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ db.json
docs.json
*.log
docs/public/*
!docs/public/_redirects
.idea/

junit.xml
Expand Down
3 changes: 2 additions & 1 deletion docs/gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module.exports = {
resolve: 'gatsby-theme-apollo-docs',
options: {
root: __dirname,
docs: require('./docs.json'),
subtitle: 'Apollo Client',
description: 'A guide to using the Apollo GraphQL Client with React',
contentDir: 'docs/source',
Expand Down Expand Up @@ -54,5 +55,5 @@ module.exports = {
},
},
},
],
]
};
9 changes: 7 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
{
"scripts": {
"start": "gatsby develop --prefix-paths"
"start": "gatsby develop --prefix-paths",
"types": "cd ../packages/apollo-client && typedoc --json ../../docs/docs.json --ignoreCompilerErrors ./src/index.ts"
},
"dependencies": {
"gatsby": "^2.1.21",
"gatsby-theme-apollo-docs": "^0.2.11"
"gatsby-theme-apollo-docs": "^0.2.14"
},
"devDependencies": {
"typedoc": "^0.14.2",
"typescript": "^3.3.3333"
}
}
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[build]
base = "docs/"
publish = "docs/public/"
command = "gatsby build --prefix-paths && mkdir -p docs/react && mv public/* docs/react && mv docs public/"
command = "npm run types && gatsby build --prefix-paths && mkdir -p docs/react && mv public/* docs/react && mv docs public/"
[build.environment]
NPM_VERSION = "6"

0 comments on commit 0da2b1e

Please sign in to comment.