1
0
mirror of https://github.com/oceanprotocol/docs.git synced 2024-11-26 19:49:26 +01:00

package updates

This commit is contained in:
Matthias Kretschmann 2020-03-24 09:04:30 +01:00
parent 62d8aac5e2
commit 9503229ae0
Signed by: m
GPG Key ID: 606EEEF3C479A91F
23 changed files with 62 additions and 68 deletions

View File

@ -13,7 +13,6 @@ It's based on the [TokenBridge by POA Network](https://medium.com/poa-network/in
## Using the Token Bridge
### Ethereum Mainnet → Ocean Pacific
If you want to transfer OCEAN out of the Ethereum Mainnet, then first you need an Ethereum account with some OCEAN in the Ethereum Mainnet, and be connected to Ethereum Mainnet in MetaMask. If you want to get some OCEAN in the Ethereum Mainnet, then see the page about [Ocean Tokens](/concepts/ocean-tokens/).

View File

@ -114,7 +114,7 @@ exports.createPages = ({ graphql, actions }) => {
}
}
`
).then(async result => {
).then(async (result) => {
if (result.errors) {
console.log(result.errors)
reject(result.errors)
@ -126,7 +126,7 @@ exports.createPages = ({ graphql, actions }) => {
//
// Create Doc pages
//
posts.forEach(post => {
posts.forEach((post) => {
createPage({
path: `${post.node.fields.slug}`,
component: docTemplate,
@ -145,14 +145,14 @@ exports.createPages = ({ graphql, actions }) => {
postsDevOcean
// only grab files with required frontmatter defined
.filter(
post =>
(post) =>
post.node.frontmatter &&
post.node.frontmatter.slug &&
post.node.frontmatter.title &&
post.node.frontmatter.description &&
post.node.frontmatter.section
)
.forEach(post => {
.forEach((post) => {
createPage({
path: `${post.node.fields.slug}`,
component: docTemplate,
@ -255,7 +255,7 @@ const createTypeDocPage = async (createPage, name, downloadUrl) => {
// Create pages from swagger json files
//
// https://github.com/swagger-api/swagger-js
const fetchSwaggerSpec = async name => {
const fetchSwaggerSpec = async (name) => {
try {
const client = await Swagger(
`https://${name}.commons.oceanprotocol.com/spec`
@ -275,11 +275,11 @@ const fetchSwaggerSpec = async name => {
}
}
const createSwaggerPages = async createPage => {
const createSwaggerPages = async (createPage) => {
const swaggerComponents = ['aquarius', 'brizo']
const apiSwaggerTemplate = path.resolve('./src/templates/Swagger/index.jsx')
const getSlug = name => {
const getSlug = (name) => {
const slug = `/references/${name}/`
return slug
}

View File

@ -25,38 +25,38 @@
"@oceanprotocol/art": "^2.2.0",
"axios": "^0.19.2",
"classnames": "^2.2.6",
"gatsby": "^2.19.43",
"gatsby-image": "^2.2.43",
"gatsby-plugin-catch-links": "^2.1.27",
"gatsby-plugin-google-analytics": "^2.1.37",
"gatsby-plugin-manifest": "^2.2.47",
"gatsby-plugin-offline": "^3.0.40",
"gatsby-plugin-react-helmet": "^3.1.23",
"gatsby-plugin-sass": "^2.1.30",
"gatsby-plugin-sharp": "^2.4.12",
"gatsby-plugin-sitemap": "^2.2.29",
"gatsby": "^2.20.3",
"gatsby-image": "^2.3.1",
"gatsby-plugin-catch-links": "^2.2.1",
"gatsby-plugin-google-analytics": "^2.2.1",
"gatsby-plugin-manifest": "^2.3.2",
"gatsby-plugin-offline": "^3.1.1",
"gatsby-plugin-react-helmet": "^3.2.1",
"gatsby-plugin-sass": "^2.2.1",
"gatsby-plugin-sharp": "^2.5.2",
"gatsby-plugin-sitemap": "^2.3.1",
"gatsby-plugin-svgr": "^2.0.2",
"gatsby-plugin-webpack-size": "^1.0.0",
"gatsby-remark-autolink-headers": "^2.1.25",
"gatsby-remark-autolink-headers": "^2.2.1",
"gatsby-remark-code-titles": "^1.1.0",
"gatsby-remark-component": "^1.1.3",
"gatsby-remark-copy-linked-files": "^2.1.39",
"gatsby-remark-copy-linked-files": "^2.2.1",
"gatsby-remark-embed-video": "^2.0.1",
"gatsby-remark-github": "^2.0.0",
"gatsby-remark-images": "^3.1.49",
"gatsby-remark-responsive-iframe": "^2.2.33",
"gatsby-remark-smartypants": "^2.1.22",
"gatsby-remark-images": "^3.2.1",
"gatsby-remark-responsive-iframe": "^2.3.1",
"gatsby-remark-smartypants": "^2.2.1",
"gatsby-remark-vscode": "^2.0.3",
"gatsby-source-filesystem": "^2.1.55",
"gatsby-source-graphql": "^2.1.34",
"gatsby-transformer-remark": "^2.6.58",
"gatsby-transformer-sharp": "^2.3.18",
"gatsby-transformer-xml": "^2.1.25",
"gatsby-transformer-yaml": "^2.2.26",
"gatsby-source-filesystem": "^2.2.2",
"gatsby-source-graphql": "^2.2.1",
"gatsby-transformer-remark": "^2.7.1",
"gatsby-transformer-sharp": "^2.4.2",
"gatsby-transformer-xml": "^2.2.1",
"gatsby-transformer-yaml": "^2.3.1",
"giphy-js-sdk-core": "^1.0.6",
"intersection-observer": "^0.7.0",
"react": "^16.13.0",
"react-dom": "^16.13.0",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-helmet": "^5.2.1",
"react-scrollspy": "^3.4.2",
"rehype-react": "^5.0.0",
@ -69,16 +69,16 @@
"swagger-client": "^3.10.0"
},
"devDependencies": {
"@svgr/webpack": "^5.2.0",
"@svgr/webpack": "^5.3.0",
"dotenv": "^8.2.0",
"eslint": "^6.8.0",
"eslint-config-oceanprotocol": "^1.5.0",
"eslint-config-prettier": "^6.10.0",
"eslint-config-prettier": "^6.10.1",
"eslint-plugin-prettier": "^3.1.2",
"markdownlint-cli": "^0.22.0",
"node-sass": "^4.13.1",
"npm-run-all": "^4.1.5",
"prettier": "^1.19.1",
"prettier": "^2.0.2",
"prettier-stylelint": "^0.4.2",
"stylelint": "^13.2.1",
"stylelint-config-bigchaindb": "^1.2.2",

View File

@ -7,9 +7,7 @@ import styles from './DocHeader.module.scss'
const DocHeader = ({ title, description, prepend }) => {
const descriptionHtml =
description &&
remark()
.use(remarkReact)
.processSync(description).contents
remark().use(remarkReact).processSync(description).contents
return (
<header className={styles.header}>

View File

@ -24,7 +24,7 @@ const query = graphql`
const FooterSocial = ({ social }) => (
<nav className={styles.links}>
{Object.keys(social).map(key => (
{Object.keys(social).map((key) => (
<a key={key} href={social[key]}>
{key}
</a>
@ -39,7 +39,7 @@ FooterSocial.propTypes = {
const Footer = () => (
<StaticQuery
query={query}
render={data => {
render={(data) => {
const { siteCompany, social } = data.site.siteMetadata
return (

View File

@ -26,7 +26,7 @@ const query = graphql`
const Header = () => (
<StaticQuery
query={query}
render={data => {
render={(data) => {
const { siteTitle } = data.site.siteMetadata
const sections = data.allSectionsYaml.edges

View File

@ -16,7 +16,7 @@ const HeaderHome = () => (
}
}
`}
render={data => {
render={(data) => {
const { siteTitle, siteDescription } = data.site.siteMetadata
return (

View File

@ -18,7 +18,7 @@ const QuickRun = () => (
}
}
`}
render={data => (
render={(data) => (
<aside className={styles.quickrun}>
<header className={styles.header}>
<h1 className={styles.tldr}>TL;DR</h1>

View File

@ -10,7 +10,7 @@ const RepositoryList = ({ repositories }) => (
<h3 className={styles.repositoryCategoryTitle}>{node.group}</h3>
<div className={styles.repositoryList}>
{node.items.map(item => (
{node.items.map((item) => (
<Repository
key={item.name}
name={item.name}

View File

@ -26,7 +26,7 @@ const query = graphql`
const Repositories = () => (
<StaticQuery
query={query}
render={data => {
render={(data) => {
const repositories = data.allRepositoriesYaml.edges
return (

View File

@ -9,7 +9,7 @@ export default function Links({ links, url }) {
<a href={url}>GitHub</a>
</li>
{links &&
links.map(link => (
links.map((link) => (
<li key={link.url}>
<a href={link.url}>{link.name}</a>
</li>

View File

@ -42,12 +42,12 @@ export default class Numbers extends PureComponent {
})
const repo = response.data
.map(item => {
.map((item) => {
if (item.name === this.props.name) {
return item
}
})
.filter(n => n)
.filter((n) => n)
const { forks, stars } = repo

View File

@ -6,10 +6,7 @@ import styles from './Readme.module.scss'
export default function Readme({ object }) {
const readmeHtml =
object &&
remark()
.use(remarkReact)
.processSync(object.text).contents
object && remark().use(remarkReact).processSync(object.text).contents
return (
object && (

View File

@ -68,7 +68,7 @@ const queryGithub = graphql`
const Repository = ({ name, links, readme }) => (
<StaticQuery
query={queryGithub}
render={data => {
render={(data) => {
const repositoriesGitHub =
data.github.organization.repositories.edges
const repositoriesYaml = data.allRepositoriesYaml.edges
@ -79,7 +79,7 @@ const Repository = ({ name, links, readme }) => (
.map(({ node }) => {
if (node.name === name) return node
})
.filter(n => n)
.filter((n) => n)
const repo = repoFilteredArray[0]
@ -103,14 +103,14 @@ const Repository = ({ name, links, readme }) => (
const linksFilteredArray = []
repositoriesYaml.map(({ node }) => {
node.items.forEach(item => {
node.items.forEach((item) => {
if (item.name === name) {
linksFilteredArray.push(item.links)
}
})
})
const moreLinks = links || linksFilteredArray.filter(n => n)[0]
const moreLinks = links || linksFilteredArray.filter((n) => n)[0]
return (
<article className={styles.repository}>

View File

@ -15,7 +15,7 @@ export default class TocScroll extends React.Component {
smoothscroll.polyfill()
}
handleClick = e => {
handleClick = (e) => {
e.preventDefault()
let elem = 0

View File

@ -127,7 +127,7 @@ MetaTags.propTypes = {
const Seo = ({ title, description, slug, article, location }) => (
<StaticQuery
query={query}
render={data => {
render={(data) => {
const siteMeta = data.site.siteMetadata
const shareImage =
data.shareImage.edges[0].node.childImageSharp.original.src

View File

@ -130,7 +130,7 @@ export default class Sidebar extends Component {
<div key={i}>
{collapsed ? (
group.items.some(
item => item.link === location.pathname
(item) => item.link === location.pathname
) ? (
<SidebarGroup
i={i}

View File

@ -37,7 +37,7 @@ export default class NotFoundPage extends Component {
}
}
handleClick = e => {
handleClick = (e) => {
e.preventDefault()
this.getRandomGif()
}

View File

@ -25,7 +25,7 @@ const ParameterExample = ({ properties }) => (
<code className="language-json">
{'{'}
{properties &&
Object.keys(properties).map(key => (
Object.keys(properties).map((key) => (
<div key={key}>
<span className="token property">{` "${key}"`}</span>
<span className="token operator">: </span>
@ -57,7 +57,7 @@ const Parameters = ({ parameters }) => (
<>
<h4 className={styles.subHeading}>Parameters</h4>
{parameters.map(parameter => {
{parameters.map((parameter) => {
const { name, type, required, description, schema } = parameter
return (
@ -93,7 +93,7 @@ Parameters.propTypes = {
const Responses = ({ responses }) => (
<>
<h4 className={styles.subHeading}>Responses</h4>
{Object.keys(responses).map(key => (
{Object.keys(responses).map((key) => (
<div key={key} className={styles.response}>
<code>{key}</code> {responses[key].description}
</div>

View File

@ -9,7 +9,7 @@ import stylesSidebar from '../../components/Sidebar.module.scss'
const Toc = ({ data }) => {
const Ids = []
const items = Object.keys(data.paths).map(key => {
const items = Object.keys(data.paths).map((key) => {
Ids.push(slugify(cleanPathKey(key)))
return (

View File

@ -1,4 +1,4 @@
export const cleanPathKey = key => {
export const cleanPathKey = (key) => {
let keyCleaned = key
if (key.includes('aquarius')) {

View File

@ -80,7 +80,7 @@ const MethodDetails = ({ property }) => {
<div>
<h4 className={styles.subHeading}>Parameters</h4>
{parameters.map(parameter => {
{parameters.map((parameter) => {
const { name, type, flags, comment } = parameter
const { isOptional } = flags
const description =
@ -242,7 +242,7 @@ const Entities = ({ entities, sourceUrl }) =>
{children &&
children
.filter(filterByKindOfProperty)
.map(property => (
.map((property) => (
<PropertyWrapper
key={shortid.generate()}
property={property}

View File

@ -2,7 +2,7 @@ export const cleanTypedocData = (data, useClasses) => {
const nodes = data.children
const cleanData = nodes
.map(node => {
.map((node) => {
const child =
node.children &&
node.children.filter(
@ -18,7 +18,7 @@ export const cleanTypedocData = (data, useClasses) => {
.filter(({ name }) => (useClasses || []).includes(name))
.sort((a, b) => useClasses.indexOf(a.name) - useClasses.indexOf(b.name))
.map(({ child }) => child)
.map(node => ({
.map((node) => ({
...node,
children:
node &&