mirror of
https://github.com/oceanprotocol/docs.git
synced 2024-11-26 19:49:26 +01:00
setup gatsby-source-openapi-aggregate
This commit is contained in:
parent
a6e056b856
commit
0fa9eeaf96
@ -9,6 +9,22 @@ if (!process.env.GITHUB_TOKEN) {
|
|||||||
|
|
||||||
const config = require('./config.js')
|
const config = require('./config.js')
|
||||||
|
|
||||||
|
const fs = require('fs')
|
||||||
|
const path = require('path')
|
||||||
|
|
||||||
|
const fromJson = filePath => {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
fs.readFile(filePath, 'utf8', (err, data) => { // eslint-disable-line
|
||||||
|
if (err) {
|
||||||
|
reject(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
resolve(data)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
siteMetadata: {
|
siteMetadata: {
|
||||||
// spread all of our config values here
|
// spread all of our config values here
|
||||||
@ -106,6 +122,27 @@ module.exports = {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
resolve: 'gatsby-source-openapi-aggregate',
|
||||||
|
options: {
|
||||||
|
specs: [
|
||||||
|
{
|
||||||
|
name: 'aquarius',
|
||||||
|
resolve: () =>
|
||||||
|
fromJson(
|
||||||
|
path.resolve(__dirname, './data/aquarius.json')
|
||||||
|
)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'brizo',
|
||||||
|
resolve: () =>
|
||||||
|
fromJson(
|
||||||
|
path.resolve(__dirname, './data/brizo.json')
|
||||||
|
)
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
'gatsby-transformer-yaml',
|
'gatsby-transformer-yaml',
|
||||||
{
|
{
|
||||||
resolve: 'gatsby-plugin-sass',
|
resolve: 'gatsby-plugin-sass',
|
||||||
|
@ -47,6 +47,7 @@
|
|||||||
"gatsby-remark-smartypants": "^2.0.6",
|
"gatsby-remark-smartypants": "^2.0.6",
|
||||||
"gatsby-source-filesystem": "^2.0.9",
|
"gatsby-source-filesystem": "^2.0.9",
|
||||||
"gatsby-source-graphql": "^2.0.6",
|
"gatsby-source-graphql": "^2.0.6",
|
||||||
|
"gatsby-source-openapi-aggregate": "^0.1.8",
|
||||||
"gatsby-transformer-remark": "^2.1.12",
|
"gatsby-transformer-remark": "^2.1.12",
|
||||||
"gatsby-transformer-sharp": "^2.1.8",
|
"gatsby-transformer-sharp": "^2.1.8",
|
||||||
"gatsby-transformer-yaml": "^2.1.5",
|
"gatsby-transformer-yaml": "^2.1.5",
|
||||||
|
Loading…
Reference in New Issue
Block a user