From 05ee70daabbf782a338ab66d0c0fa1e643cb6633 Mon Sep 17 00:00:00 2001 From: wpioneer Date: Fri, 3 Jun 2016 02:32:38 +0300 Subject: [PATCH] upgrade to Gatsby 0.11 --- .babelrc | 5 +- .eslintrc | 5 +- .gitignore | 30 +- .project | 11 + app.js | 10 - browserlist | 6 + components/BlogContent/index.jsx | 1 - components/BlogContent/style.sss | 24 - components/BlogNav/index.jsx | 10 +- components/BlogNav/style.css | 24 + components/BlogNav/style.sss | 23 - components/BlogPage/index.jsx | 4 +- components/BlogPage/style.css | 17 + components/BlogPage/style.sss | 16 - components/BlogPost/index.jsx | 12 +- components/BlogPost/style.css | 105 ++++ components/BlogPost/style.sss | 108 ---- components/BlogSocial/index.jsx | 23 +- components/BlogSocial/style.css | 32 + components/BlogSocial/style.sss | 34 - components/ReadNext/index.jsx | 2 +- components/ReadNext/style.css | 4 + components/ReadNext/style.sss | 3 - components/SidebarLeft/index.jsx | 31 +- components/SidebarLeft/style.css | 67 ++ components/SidebarLeft/style.sss | 59 -- config.toml | 17 +- gatsby-node.js | 13 + gatsby.config.js | 54 -- html.js | 45 +- package.json | 57 +- pages/404.md | 2 +- pages/_template.jsx | 3 +- .../2015-05-01-hello-world/Gutenberg.jpg | Bin .../2015-05-01-hello-world/Printing-press.png | Bin .../2015-05-01-hello-world/index.md | 0 .../2015-05-01-hello-world/movable-type.jpg | Bin .../2015-05-06-my-second-post/index.md | 0 .../2015-05-28-hi-folks/index.md | 0 pages/images/photo.jpg | Bin 8568 -> 0 bytes pages/images/photo1.jpg | Bin 5625 -> 0 bytes pages/images/photo10.jpg | Bin 4378 -> 0 bytes pages/images/photo11.jpg | Bin 5998 -> 0 bytes pages/images/photo12.png | Bin 23472 -> 0 bytes pages/images/photo2.jpg | Bin 4770 -> 0 bytes pages/images/photo3.jpg | Bin 3555 -> 0 bytes pages/images/photo4.jpg | Bin 5167 -> 0 bytes pages/images/photo5.jpg | Bin 3849 -> 0 bytes pages/images/photo6.jpg | Bin 3072 -> 0 bytes pages/images/photo7.jpg | Bin 5043 -> 0 bytes pages/images/photo8.jpg | Bin 3392 -> 0 bytes pages/index.jsx | 10 +- pages/{ => pages}/about/index.md | 0 pages/{ => pages}/contact/index.md | 0 pages/{images/photo9.jpg => photo.jpg} | Bin static/css/base.css | 33 + static/css/typography.css | 592 +++++++++++------- .travis.yml => travis.yml | 0 wrappers/md.jsx | 2 +- 59 files changed, 795 insertions(+), 699 deletions(-) create mode 100644 .project delete mode 100644 app.js create mode 100644 browserlist delete mode 100644 components/BlogContent/index.jsx delete mode 100644 components/BlogContent/style.sss create mode 100644 components/BlogNav/style.css delete mode 100644 components/BlogNav/style.sss create mode 100644 components/BlogPage/style.css delete mode 100644 components/BlogPage/style.sss create mode 100644 components/BlogPost/style.css delete mode 100644 components/BlogPost/style.sss create mode 100644 components/BlogSocial/style.css delete mode 100644 components/BlogSocial/style.sss create mode 100644 components/ReadNext/style.css delete mode 100644 components/ReadNext/style.sss create mode 100644 components/SidebarLeft/style.css delete mode 100644 components/SidebarLeft/style.sss create mode 100644 gatsby-node.js delete mode 100644 gatsby.config.js rename pages/{ => articles}/2015-05-01-hello-world/Gutenberg.jpg (100%) rename pages/{ => articles}/2015-05-01-hello-world/Printing-press.png (100%) rename pages/{ => articles}/2015-05-01-hello-world/index.md (100%) rename pages/{ => articles}/2015-05-01-hello-world/movable-type.jpg (100%) rename pages/{ => articles}/2015-05-06-my-second-post/index.md (100%) rename pages/{ => articles}/2015-05-28-hi-folks/index.md (100%) delete mode 100644 pages/images/photo.jpg delete mode 100644 pages/images/photo1.jpg delete mode 100644 pages/images/photo10.jpg delete mode 100644 pages/images/photo11.jpg delete mode 100644 pages/images/photo12.png delete mode 100644 pages/images/photo2.jpg delete mode 100644 pages/images/photo3.jpg delete mode 100644 pages/images/photo4.jpg delete mode 100644 pages/images/photo5.jpg delete mode 100644 pages/images/photo6.jpg delete mode 100644 pages/images/photo7.jpg delete mode 100644 pages/images/photo8.jpg rename pages/{ => pages}/about/index.md (100%) rename pages/{ => pages}/contact/index.md (100%) rename pages/{images/photo9.jpg => photo.jpg} (100%) create mode 100644 static/css/base.css rename .travis.yml => travis.yml (100%) diff --git a/.babelrc b/.babelrc index 2a02409..6d3d0b4 100644 --- a/.babelrc +++ b/.babelrc @@ -1,3 +1,4 @@ { - "stage": 2, -} + "presets": ['react', 'es2015', 'stage-0'], + "plugins": ['add-module-exports'] +} \ No newline at end of file diff --git a/.eslintrc b/.eslintrc index e229935..9762e15 100644 --- a/.eslintrc +++ b/.eslintrc @@ -10,8 +10,11 @@ "no-else-return": [0], "space-infix-ops": [0], "react/prefer-es6-class": [0], + "react/prefer-stateless-function": [0], + "import/no-unresolved": [0], + "global-require": [0], }, "globals": { "__PREFIX_LINKS__": true, }, -} +} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 123ae94..e9ba7a2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,27 +1,5 @@ -# Logs -logs -*.log +node_modules/ +public -# Runtime data -pids -*.pid -*.seed - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage - -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (http://nodejs.org/api/addons.html) -build/Release - -# Dependency directory -# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git -node_modules +.gatsby-context.js +pages/.manifest \ No newline at end of file diff --git a/.project b/.project new file mode 100644 index 0000000..e44864e --- /dev/null +++ b/.project @@ -0,0 +1,11 @@ + + + gatsby-starter-lumen + + + + + + + + diff --git a/app.js b/app.js deleted file mode 100644 index e431046..0000000 --- a/app.js +++ /dev/null @@ -1,10 +0,0 @@ -exports.loadContext = function(callback) { - let context = require.context('./pages', true) - if (module.hot) { - module.hot.accept(context.id, () => { - context = require.context('./pages', true) - return callback(context) - }) - } - return callback(context) -} diff --git a/browserlist b/browserlist new file mode 100644 index 0000000..5d05bcd --- /dev/null +++ b/browserlist @@ -0,0 +1,6 @@ +# Browsers that we support + +>1% +ie >= 9 +safari >= 6 +last 3 versions \ No newline at end of file diff --git a/components/BlogContent/index.jsx b/components/BlogContent/index.jsx deleted file mode 100644 index 1fa4520..0000000 --- a/components/BlogContent/index.jsx +++ /dev/null @@ -1 +0,0 @@ -import './style.sss' \ No newline at end of file diff --git a/components/BlogContent/style.sss b/components/BlogContent/style.sss deleted file mode 100644 index c7855fd..0000000 --- a/components/BlogContent/style.sss +++ /dev/null @@ -1,24 +0,0 @@ -.wrapper - lost-center: 1070px -.content - lost-column: 2/3 -.main-inner - padding: 40px 35px - -@media screen and (max-width: 1100px) - .content - lost-column: 2/4 - .main-inner - padding: 35px 20px - -@media screen and (max-width: 900px) - .content - lost-column: 7/12 - .main-inner - padding: 30px 20px - -@media screen and (max-width: 500px) - .content - lost-column: 4/4 - .main-inner - padding: 25px 20px \ No newline at end of file diff --git a/components/BlogNav/index.jsx b/components/BlogNav/index.jsx index cda52a2..b26d9e6 100644 --- a/components/BlogNav/index.jsx +++ b/components/BlogNav/index.jsx @@ -1,8 +1,8 @@ import React from 'react' import { RouteHandler, Link } from 'react-router' -import { link } from 'gatsby-helpers' +import { prefixLink } from 'gatsby-helpers' -import './style.sss' +import './style.css' class BlogNav extends React.Component { render() { @@ -11,15 +11,15 @@ class BlogNav extends React.Component {