Merge pull request #66 from lgraubner/cleanup
remove unused dependencies, fix inconsistencies, remove PropTypes
This commit is contained in:
commit
d2f7756832
6 changed files with 649 additions and 1549 deletions
|
|
@ -1,30 +1,27 @@
|
|||
const _ = require("lodash")
|
||||
const Promise = require("bluebird")
|
||||
const path = require("path")
|
||||
const select = require(`unist-util-select`)
|
||||
const fs = require(`fs-extra`)
|
||||
const Promise = require('bluebird')
|
||||
const path = require('path')
|
||||
|
||||
exports.createPages = ({ graphql, boundActionCreators }) => {
|
||||
const { createPage } = boundActionCreators
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
const pages = []
|
||||
const blogPost = path.resolve("./src/templates/blog-post.js")
|
||||
resolve(
|
||||
graphql(
|
||||
`
|
||||
{
|
||||
allMarkdownRemark(limit: 1000) {
|
||||
edges {
|
||||
node {
|
||||
frontmatter {
|
||||
path
|
||||
{
|
||||
allMarkdownRemark(limit: 1000) {
|
||||
edges {
|
||||
node {
|
||||
frontmatter {
|
||||
path
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
||||
`
|
||||
).then(result => {
|
||||
if (result.errors) {
|
||||
console.log(result.errors)
|
||||
|
|
|
|||
2138
package-lock.json
generated
2138
package-lock.json
generated
File diff suppressed because it is too large
Load diff
20
package.json
20
package.json
|
|
@ -7,22 +7,20 @@
|
|||
"url": "https://github.com/gatsbyjs/gatsby-starter-blog/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"gatsby": "^1.9.73",
|
||||
"gatsby-link": "^1.6.22",
|
||||
"gatsby-plugin-google-analytics": "^1.0.10",
|
||||
"gatsby-plugin-manifest": "^1.0.8",
|
||||
"gatsby": "^1.9.92",
|
||||
"gatsby-link": "^1.6.24",
|
||||
"gatsby-plugin-google-analytics": "^1.0.11",
|
||||
"gatsby-plugin-offline": "^1.0.10",
|
||||
"gatsby-plugin-preact": "^1.0.12",
|
||||
"gatsby-plugin-react-helmet": "^1.0.8",
|
||||
"gatsby-plugin-sharp": "^1.6.9",
|
||||
"gatsby-plugin-sharp": "^1.6.17",
|
||||
"gatsby-plugin-typography": "^1.7.10",
|
||||
"gatsby-remark-copy-linked-files": "^1.5.9",
|
||||
"gatsby-remark-images": "^1.5.18",
|
||||
"gatsby-remark-prismjs": "^1.2.1",
|
||||
"gatsby-remark-copy-linked-files": "^1.5.16",
|
||||
"gatsby-remark-images": "^1.5.28",
|
||||
"gatsby-remark-prismjs": "^1.2.9",
|
||||
"gatsby-remark-responsive-iframe": "^1.4.8",
|
||||
"gatsby-remark-smartypants": "^1.4.8",
|
||||
"gatsby-source-filesystem": "^1.5.5",
|
||||
"gatsby-transformer-remark": "^1.7.17",
|
||||
"gatsby-source-filesystem": "^1.5.6",
|
||||
"gatsby-transformer-remark": "^1.7.19",
|
||||
"gatsby-transformer-sharp": "^1.6.10",
|
||||
"lodash": "^4.15.0",
|
||||
"react-responsive-grid": "^0.3.3",
|
||||
|
|
|
|||
|
|
@ -71,10 +71,4 @@ class Template extends React.Component {
|
|||
}
|
||||
}
|
||||
|
||||
Template.propTypes = {
|
||||
children: React.PropTypes.func,
|
||||
location: React.PropTypes.object,
|
||||
route: React.PropTypes.object,
|
||||
}
|
||||
|
||||
export default Template
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ class BlogIndex extends React.Component {
|
|||
|
||||
return (
|
||||
<div>
|
||||
<Helmet title={get(this, 'props.data.site.siteMetadata.title')} />
|
||||
<Helmet title={siteTitle} />
|
||||
<Bio />
|
||||
{posts.map(post => {
|
||||
if (post.node.path !== '/404/') {
|
||||
|
|
@ -29,7 +29,7 @@ class BlogIndex extends React.Component {
|
|||
style={{ boxShadow: 'none' }}
|
||||
to={post.node.frontmatter.path}
|
||||
>
|
||||
{post.node.frontmatter.title}
|
||||
{title}
|
||||
</Link>
|
||||
</h3>
|
||||
<small>{post.node.frontmatter.date}</small>
|
||||
|
|
@ -43,10 +43,6 @@ class BlogIndex extends React.Component {
|
|||
}
|
||||
}
|
||||
|
||||
BlogIndex.propTypes = {
|
||||
route: React.PropTypes.object,
|
||||
}
|
||||
|
||||
export default BlogIndex
|
||||
|
||||
export const pageQuery = graphql`
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import React from 'react'
|
||||
import Helmet from 'react-helmet'
|
||||
import Link from 'gatsby-link'
|
||||
import get from 'lodash/get'
|
||||
|
||||
import Bio from '../components/Bio'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue