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, "browser": true,
"node": true "node": true
}, },
"globals": {
"graphql": true
},
"extends": ["eslint:recommended", "plugin:react/recommended"], "extends": ["eslint:recommended", "plugin:react/recommended"],
"rules": { "rules": {
"quotes": ["error", "single"], "quotes": ["error", "single"],

1
.gitignore vendored
View File

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

View File

@ -7,6 +7,7 @@ cache:
testing: testing:
stage: test stage: test
script: script:
- npm install - npm i gatsby-cli -g
- npm i
- npm test - npm test
- npm run build - 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", "title": "Matthias Kretschmann",
"tagline": "Designer & Developer", "tagline": "Designer & Developer",
"description": "", "description": "",
"url": "https://matthiaskretschmann.com",
"social": { "social": {
"Twitter": "https://twitter.com/kremalicious", "Twitter": "https://twitter.com/kremalicious",
"GitHub": "https://github.com/kremalicious", "GitHub": "https://github.com/kremalicious",

View File

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

View File

@ -6,7 +6,9 @@
"gatsby": "^1.9.241", "gatsby": "^1.9.241",
"gatsby-link": "^1.6.39", "gatsby-link": "^1.6.39",
"gatsby-plugin-react-helmet": "^2.0.8", "gatsby-plugin-react-helmet": "^2.0.8",
"gatsby-plugin-react-next": "^1.0.11",
"gatsby-plugin-sass": "latest", "gatsby-plugin-sass": "latest",
"gatsby-plugin-sitemap": "^1.2.20",
"gatsby-source-filesystem": "^1.5.28", "gatsby-source-filesystem": "^1.5.28",
"gatsby-transformer-json": "^1.0.16", "gatsby-transformer-json": "^1.0.16",
"react-helmet": "^5.2.0", "react-helmet": "^5.2.0",
@ -18,12 +20,17 @@
"eslint": "^4.19.1", "eslint": "^4.19.1",
"eslint-plugin-graphql": "^1.5.0", "eslint-plugin-graphql": "^1.5.0",
"eslint-plugin-react": "^7.7.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": { "scripts": {
"lint:js": "eslint ./src/**/*.js",
"lint:css": "stylelint ./src/**/*.scss",
"lint": "npm run lint:js && npm run lint:css",
"build": "gatsby build", "build": "gatsby build",
"start": "gatsby develop", "start": "gatsby develop",
"format": "prettier --write 'src/**/*.js'", "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 React from 'react'
import meta from '../../data/meta.json' import meta from '../../../data/meta.json'
import './Footer.scss' import './Footer.scss'
const Footer = () => { const Footer = () => {

View File

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

View File

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

View File

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

View File

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

View File

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