Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gatsby V2 upgrade #8

Merged
merged 48 commits into from
Jan 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
b25a0d1
Upgraded to latest packages
travis-r6s Sep 18, 2018
019d4ab
Updated to use graphql import, removed unused imports
travis-r6s Sep 18, 2018
6a23f35
Added graphql import, removed unused imports
travis-r6s Sep 18, 2018
736d38e
added react-helmet
travis-r6s Sep 18, 2018
f74c3f3
Changed to import link from gatsby package
travis-r6s Sep 18, 2018
39cc685
Removed gatsby-link package
travis-r6s Sep 18, 2018
6ef5676
Added import alias so as not to conflict with component export
travis-r6s Sep 18, 2018
26fd25d
Added missing import
travis-r6s Sep 18, 2018
cee3f75
Updated to new react-icons import syntax
travis-r6s Sep 18, 2018
f84b54e
REmoved unused const
travis-r6s Sep 18, 2018
f1890ee
removed unused imports
travis-r6s Sep 18, 2018
3f427a6
removed unused consts
travis-r6s Sep 18, 2018
c8230b9
Updating to keep linting happy
travis-r6s Sep 18, 2018
e1b3045
Formatting to keep linter happy
travis-r6s Sep 18, 2018
2925214
removed react-next
travis-r6s Sep 18, 2018
1061bbd
Updated for v2 - using static query
travis-r6s Sep 18, 2018
ed58434
Updated const names for V2
travis-r6s Sep 18, 2018
395d583
Removed unused (and deprecated) import
travis-r6s Sep 18, 2018
82a5961
Updated deprecated names to v2 names
travis-r6s Sep 18, 2018
80a0a89
Updated to use scss
travis-r6s Sep 18, 2018
ebdd68a
removed unused const
travis-r6s Sep 18, 2018
7a1ea15
Formatted
travis-r6s Sep 18, 2018
f159d8d
Added gatsby-prism
travis-r6s Sep 18, 2018
8b3c4d1
Updated for new Prism
travis-r6s Sep 18, 2018
62b850b
Added layout wrapper
travis-r6s Sep 18, 2018
db161b8
Removed prismjs, added destructuring of data
travis-r6s Sep 18, 2018
a7d7ecb
Added keys + updated == to ===
travis-r6s Sep 18, 2018
347b4c9
Whoops - removed temp data
travis-r6s Sep 18, 2018
1114cd4
Removed unused page
travis-r6s Sep 18, 2018
90ce65a
Added layout components
travis-r6s Sep 18, 2018
1f5890e
Added keys
travis-r6s Sep 18, 2018
ceafe40
removed unecy scripts
travis-r6s Sep 18, 2018
13c6f68
Cahgned favicon url to root
travis-r6s Sep 18, 2018
0ae18d2
Added linting and formatting scripts
travis-r6s Sep 18, 2018
ae2f0b5
Added formatting/linting configs
travis-r6s Sep 18, 2018
767b15e
Updated to use semis
travis-r6s Sep 18, 2018
17d0b76
Remvoed proptypes
travis-r6s Sep 18, 2018
bc8550b
Removed experimental option, added es6
travis-r6s Sep 18, 2018
c21632b
On second thoughts, follow offical Gatsby - no semis
travis-r6s Sep 18, 2018
3d38f51
Added nav toggle back
travis-r6s Sep 18, 2018
e45d3fd
Formatted
travis-r6s Sep 18, 2018
5da0201
Removed semis
travis-r6s Sep 18, 2018
4b68dfd
updated formatting
travis-r6s Sep 18, 2018
e8ed30f
Removed manual css import
travis-r6s Sep 18, 2018
fd26dfc
Removed html.js
travis-r6s Sep 18, 2018
a92df17
Implement solution to menu's collapsing on page change
travis-r6s Dec 28, 2018
61ec4e2
Add conditional window reference
travis-r6s Jan 2, 2019
43dc98b
Update to check url (not href)
travis-r6s Jan 2, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {
"env": {
"browser": true,
"es6": true,
},
"plugins": [
"react",
],
"globals": {
"graphql": false,
},
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 6,
"ecmaFeatures": {
"jsx": true,
},
}
}
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"trailingComma": "es5",
"semi": false,
"singleQuote": true
}
15 changes: 12 additions & 3 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ module.exports = {
title: `Style Guide Guide`,
},
plugins: [
'gatsby-plugin-react-next',
'gatsby-plugin-catch-links',
{
resolve: 'gatsby-source-filesystem',
Expand All @@ -23,11 +22,21 @@ module.exports = {
options: {
linkImagesToOriginal: false
}
},
{
resolve: `gatsby-remark-prismjs`,
options: {
classPrefix: "language-",
inlineCodeMarker: null,
aliases: {},
showLineNumbers: false,
},
}
]
}
},
'gatsby-plugin-react-helmet',
'gatsby-plugin-sharp'
`gatsby-plugin-sass`,
'gatsby-plugin-sharp',
'gatsby-plugin-react-helmet'
],
}
16 changes: 8 additions & 8 deletions gatsby-node.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const path = require(`path`);
const { createFilePath } = require(`gatsby-source-filesystem`);
const path = require(`path`)
const { createFilePath } = require(`gatsby-source-filesystem`)

exports.onCreateNode = ({ node, getNode, boundActionCreators }) => {
const { createNodeField } = boundActionCreators
exports.onCreateNode = ({ node, getNode, actions }) => {
const { createNodeField } = actions
if (node.internal.type === `MarkdownRemark`) {
const slug = createFilePath({ node, getNode, basePath: `pages` })
createNodeField({
Expand All @@ -11,10 +11,10 @@ exports.onCreateNode = ({ node, getNode, boundActionCreators }) => {
value: slug,
})
}
};
}

exports.createPages = ({ graphql, boundActionCreators }) => {
const { createPage } = boundActionCreators
exports.createPages = ({ graphql, actions }) => {
const { createPage } = actions
return new Promise((resolve, reject) => {
graphql(`
{
Expand Down Expand Up @@ -124,4 +124,4 @@ exports.createPages = ({ graphql, boundActionCreators }) => {
resolve()
})
})
};
}
Loading