1
0
mirror of https://github.com/kremalicious/portfolio.git synced 2024-12-22 09:13:19 +01:00

finalize gatsby migration

This commit is contained in:
Matthias Kretschmann 2018-04-08 00:19:54 +02:00
parent 239efe8b0e
commit 8d0a028d39
Signed by: m
GPG Key ID: 606EEEF3C479A91F
14 changed files with 40 additions and 20 deletions

View File

@ -11,6 +11,9 @@
"browser": true,
"node": true
},
"globals": {
"graphql": true
},
"extends": ["eslint:recommended", "plugin:react/recommended"],
"rules": {
"quotes": ["error", "single"],

1
.gitignore vendored
View File

@ -10,4 +10,3 @@ npm-debug.log*
yarn-debug.log*
yarn.lock
package-lock.json
src/**/*.css

View File

@ -7,6 +7,7 @@ cache:
testing:
stage: test
script:
- npm install
- npm i gatsby-cli -g
- npm i
- npm test
- npm run build

10
.stylelintrc Normal file
View File

@ -0,0 +1,10 @@
{
"extends": [
"stylelint-config-standard"
],
"syntax": "scss",
"rules": {
"indentation": 4,
"number-leading-zero": "never"
}
}

View File

@ -2,6 +2,7 @@
"title": "Matthias Kretschmann",
"tagline": "Designer & Developer",
"description": "",
"url": "https://matthiaskretschmann.com",
"social": {
"Twitter": "https://twitter.com/kremalicious",
"GitHub": "https://github.com/kremalicious",

View File

@ -1,10 +1,14 @@
const meta = require('./data/meta.json')
module.exports = {
siteMetadata: {
title: 'Gatsby Default Starter',
siteUrl: `${meta.url}`,
},
plugins: [
'gatsby-plugin-react-next',
'gatsby-plugin-react-helmet',
'gatsby-transformer-json',
'gatsby-plugin-sitemap',
{
resolve: 'gatsby-source-filesystem',
options: {
@ -17,9 +21,9 @@ module.exports = {
options: {
includePaths: [
`${__dirname}/node_modules`,
`${__dirname}/src/styles`,
`${__dirname}/src/styles`
],
},
},
],
}
]
}

View File

@ -6,7 +6,9 @@
"gatsby": "^1.9.241",
"gatsby-link": "^1.6.39",
"gatsby-plugin-react-helmet": "^2.0.8",
"gatsby-plugin-react-next": "^1.0.11",
"gatsby-plugin-sass": "latest",
"gatsby-plugin-sitemap": "^1.2.20",
"gatsby-source-filesystem": "^1.5.28",
"gatsby-transformer-json": "^1.0.16",
"react-helmet": "^5.2.0",
@ -18,12 +20,17 @@
"eslint": "^4.19.1",
"eslint-plugin-graphql": "^1.5.0",
"eslint-plugin-react": "^7.7.0",
"prettier": "^1.11.1"
"prettier": "^1.11.1",
"stylelint": "^9.2.0",
"stylelint-config-standard": "^18.2.0"
},
"scripts": {
"lint:js": "eslint ./src/**/*.js",
"lint:css": "stylelint ./src/**/*.scss",
"lint": "npm run lint:js && npm run lint:css",
"build": "gatsby build",
"start": "gatsby develop",
"format": "prettier --write 'src/**/*.js'",
"test": "echo \"Error: no test specified\" && exit 1"
"test": "npm run lint"
}
}

View File

@ -1 +0,0 @@
<!DOCTYPE html><html><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="ie=edge"/><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/><title data-react-helmet="true"></title><script src="/socket.io/socket.io.js"></script></head><body><div id="___gatsby"></div><script src="/commons.js"></script></body></html>

View File

@ -1,5 +1,5 @@
import React from 'react'
import meta from '../../data/meta.json'
import meta from '../../../data/meta.json'
import './Footer.scss'
const Footer = () => {

View File

@ -3,7 +3,7 @@ import Link from 'react-router-dom/Link'
import PropTypes from 'prop-types'
import Social from './Social'
import './Header.scss'
import meta from '../../data/meta.json'
import meta from '../../../data/meta.json'
class Header extends Component {
render() {

View File

@ -1,6 +1,6 @@
import React from 'react'
import { Twitter, GitHub, Facebook } from '../atoms/Icons'
import meta from '../../data/meta.json'
import meta from '../../../data/meta.json'
import './Social.scss'
const social = meta.social

View File

@ -6,7 +6,6 @@ import images from '../../images'
import './Projects.scss'
const Projects = ({ data }) => {
console.log(data)
const projects = data.allProjectsJson
return <div className="projects full-width">

View File

@ -9,10 +9,7 @@ import images from '../images'
import './Project.scss'
const Project = ({ data }) => {
const project = data.allProjectsJson
console.log(project)
const project = data.allProjectsJson.edges[0].node
const title = project.title
const img = project.img
const img_more = project.img_more
@ -82,8 +79,8 @@ Project.propTypes = {
export default Project
export const query = graphql`
query ProjectQuery($slug: String!) {
allProjectsJson(slug: { eq: $slug }) {
query ProjectQuery($slug: String) {
allProjectsJson(filter: { slug: { eq: $slug } }) {
edges {
node {
title

View File

@ -3,7 +3,7 @@ import PropTypes from 'prop-types'
import Helmet from 'react-helmet'
import FadeIn from '../components/atoms/FadeIn'
import Footer from '../components/molecules/Footer'
import meta from '../data/meta.json'
import meta from '../../data/meta.json'
import './index.scss'
const Head = () => (