Permalink
Browse files

Upgrade Phenomic to 0.17.0

1 parent de054a6 commit d6121166e13e425e2095322fdc456d10fdc3948a @MoOx MoOx committed Sep 27, 2016
Showing with 132 additions and 108 deletions.
  1. +26 −9 package.json
  2. +25 −14 scripts/phenomic.browser.js
  3. +3 −3 scripts/phenomic.node.js
  4. +5 −5 web_modules/LayoutContainer/index.js → src/AppContainer.js
  5. 0 {web_modules → src}/_legacy-css/blocks/author.css
  6. 0 {web_modules → src}/_legacy-css/blocks/column.css
  7. 0 {web_modules → src}/_legacy-css/blocks/contributors.css
  8. 0 {web_modules → src}/_legacy-css/blocks/footer.css
  9. 0 {web_modules → src}/_legacy-css/blocks/forms.css
  10. 0 {web_modules → src}/_legacy-css/blocks/header.css
  11. 0 {web_modules → src}/_legacy-css/blocks/highlight.css
  12. 0 {web_modules → src}/_legacy-css/blocks/links.css
  13. 0 {web_modules → src}/_legacy-css/blocks/list.css
  14. 0 {web_modules → src}/_legacy-css/blocks/note.css
  15. 0 {web_modules → src}/_legacy-css/blocks/post.css
  16. 0 {web_modules → src}/_legacy-css/blocks/section.css
  17. 0 {web_modules → src}/_legacy-css/index.css
  18. 0 {web_modules → src}/_legacy-css/js/images.css
  19. +5 −5 {web_modules → src/components}/Author/index.js
  20. +2 −2 {web_modules → src/components}/AuthorsList/index.js
  21. BIN {web_modules → src/components}/Avatar/default.png
  22. 0 {web_modules → src/components}/Avatar/index.js
  23. 0 {web_modules → src/components}/Avatars/index.js
  24. 0 {web_modules → src/components}/Button/index.js
  25. 0 {web_modules → src/components}/Button/styles.css
  26. 0 {web_modules → src/components}/Contributor/index.js
  27. +1 −1 {web_modules → src/components}/Contributors/index.js
  28. +5 −5 {web_modules → src/components}/Footer/index.js
  29. 0 {web_modules → src/components}/GoogleAnalyticsTracker/index.js
  30. +3 −3 {web_modules → src/components}/Header/index.js
  31. 0 {web_modules → src/components}/Html/index.js
  32. 0 {web_modules → src/components}/I18nBanner/cross.svg
  33. 0 {web_modules → src/components}/I18nBanner/index.js
  34. 0 {web_modules → src/components}/I18nBanner/styles.css
  35. +1 −1 {web_modules → src/components}/LatestPosts/index.js
  36. 0 {web_modules → src/components}/LatestPosts/styles.css
  37. +8 −8 {web_modules → src/components}/Navigation/index.js
  38. 0 {web_modules → src/components}/Navigation/styles.css
  39. +2 −2 {web_modules → src/components}/PostPreview/index.js
  40. 0 {web_modules → src/components}/PostPreview/styles.css
  41. +3 −3 {web_modules → src/components}/PostsByAuthor/index.js
  42. +3 −3 {web_modules → src/components}/PostsByTag/index.js
  43. 0 {web_modules → src/components}/PostsList/index.js
  44. 0 {web_modules → src/components}/ReadingTime/__tests__/index.js
  45. 0 {web_modules → src/components}/ReadingTime/index.js
  46. +1 −1 {web_modules → src/components}/TopContributors/index.js
  47. 0 {web_modules → src/components}/browser-locale-support/__tests__/index.js
  48. 0 {web_modules → src/components}/browser-locale-support/index.js
  49. 0 {web_modules → src/components}/formatDate.js
  50. 0 {web_modules → src/components}/getAuthorUri.js
  51. 0 {web_modules → src}/i18n/en.yml
  52. 0 {web_modules → src}/i18n/fr.yml
  53. 0 {web_modules → src}/i18n/get.js
  54. 0 {web_modules → src}/i18n/getLang.js
  55. 0 {web_modules → src}/i18n/index.js
  56. 0 {web_modules → src}/icons/bookmark.svg
  57. 0 {web_modules → src}/icons/chat.svg
  58. 0 {web_modules → src}/icons/facebook.svg
  59. 0 {web_modules → src}/icons/github.svg
  60. 0 {web_modules → src}/icons/home.svg
  61. 0 {web_modules → src}/icons/pencil.svg
  62. 0 {web_modules → src}/icons/text-file.svg
  63. 0 {web_modules → src}/icons/twitter.svg
  64. BIN {web_modules → src}/images/putaindecode-avatar.png
  65. BIN {web_modules → src}/images/putaindecode-logo--no-bubble-16.png
  66. BIN {web_modules → src}/images/putaindecode-logo--no-bubble-32.png
  67. BIN {web_modules → src}/images/putaindecode-logo--no-bubble-512--no-background.png
  68. BIN {web_modules → src}/images/putaindecode-logo--no-bubble-512--revert.png
  69. BIN {web_modules → src}/images/putaindecode-logo--no-bubble-512--trim.png
  70. BIN {web_modules → src}/images/putaindecode-logo--no-bubble-512.png
  71. 0 {web_modules → src}/images/putaindecode-logo--no-bubble.svg
  72. 0 {web_modules → src}/images/putaindecode-logo.svg
  73. 0 {web_modules → src}/images/putaindecode.svg
  74. +1 −1 {web_modules → src}/layouts/AdventCalendar/index.js
  75. +4 −4 {web_modules → src}/layouts/Homepage/index.js
  76. 0 {web_modules → src}/layouts/Homepage/styles.css
  77. BIN {web_modules → src}/layouts/Homepage/what.jpg
  78. 0 {web_modules → src}/layouts/Page/index.js
  79. 0 {web_modules → src}/layouts/PageError/index.js
  80. 0 {web_modules → src}/layouts/PageLoading/index.js
  81. 0 {web_modules → src}/layouts/PageLoading/styles.css
  82. +2 −2 {web_modules → src}/layouts/Post/index.js
  83. +1 −1 {web_modules → src}/layouts/Posts/index.js
  84. +3 −3 {web_modules → src}/layouts/WithHeroHeader/index.js
  85. +3 −3 {web_modules/app → src}/metadata.js
  86. +12 −12 {web_modules/app → src}/routes.js
  87. 0 {web_modules/app → src}/store.js
  88. +13 −17 webpack.config.babel.js
View
@@ -34,9 +34,9 @@
"babel-loader": "^6.2.3",
"babel-plugin-webpack-loaders": "^0.3.6",
"babel-polyfill": "^6.5.0",
- "babel-preset-es2015": "^6.5.0",
+ "babel-preset-latest": "^6.14.0",
"babel-preset-react": "^6.5.0",
- "babel-preset-react-hmre": "^1.1.0",
+ "babel-preset-react-optimize": "^1.0.1",
"babel-preset-stage-1": "^6.5.0",
"chalk": "^1.0.0",
"classnames": "^1.2.0",
@@ -55,12 +55,13 @@
"multimatch": "^2.0.0",
"nano-logger": "^1.0.0",
"opn": "^1.0.1",
- "phenomic": "^0.16.2",
+ "phenomic": "^0.17.1",
"postcss-cssnext": "^2.2.0",
"postcss-import": "^7.1.0",
"postcss-loader": "^0.7.0",
"promise": "^7.0.0",
"raw-loader": "^0.5.1",
+ "react-hot-loader": "^3.0.0-beta.5",
"rimraf": "^2.3.2",
"style-loader": "^0.12.2",
"svgo": "^0.6.0",
@@ -83,14 +84,30 @@
"deploy": "./scripts/deploy.sh"
},
"phenomic": {
- "CNAME": true
+ "CNAME": true,
+ "cache": true
},
"babel": {
- "presets": [
- "babel-preset-react",
- "babel-preset-es2015",
- "babel-preset-stage-1"
- ]
+ "env": {
+ "development": {
+ "presets": [
+ "babel-preset-latest",
+ "babel-preset-stage-1",
+ "babel-preset-react"
+ ],
+ "plugins": [
+ "react-hot-loader/babel"
+ ]
+ },
+ "production": {
+ "presets": [
+ "babel-preset-react-optimize",
+ "babel-preset-latest",
+ "babel-preset-stage-1",
+ "babel-preset-react"
+ ]
+ }
+ }
},
"eslintConfig": {
"root": true,
@@ -1,35 +1,46 @@
+// Hot loading HRM Patch
+import "react-hot-loader/patch"
+
// assets
-require.context("icons", true, /\.svg$/)
+// require.context("../src/icons", true, /\.svg$/)
require.context("../content", true, /\.(html|json|txt|ico|jpe?g|png|gif)$/)
// OMG GLOBAL STYLES !
-import "_legacy-css/index.css"
+import "../src/_legacy-css/index.css"
// phenomic
import "babel-polyfill"
import "whatwg-fetch"
-import metadata from "../web_modules/app/metadata"
-import routes from "../web_modules/app/routes"
-import store from "../web_modules/app/store"
-
+import metadata from "../src/metadata.js"
+import routes from "../src/routes.js"
+import store from "../src/store.js"
import phenomicClient from "phenomic/lib/client"
-phenomicClient({
- metadata,
- routes,
- store,
-})
+phenomicClient({ metadata, routes, store })
-// hot loading
-// md files → JSON && generate collection + hot loading for dev
+// md files processed via phenomic-loader to JSON & generate collection
let mdContext = require.context("../content", true, /\.md$/)
mdContext.keys().forEach(mdContext)
+
+// hot loading
if (module.hot) {
- const mdHotUpdater = require("phenomic/lib/client/hot-md").default
+
+ // hot load md
module.hot.accept(mdContext.id, () => {
mdContext = require.context("../content", true, /\.md$/)
+ const mdHotUpdater = require("phenomic/lib/client/hot-md").default
const requireUpdate = mdHotUpdater(mdContext, window.__COLLECTION__, store)
mdContext.keys().forEach(requireUpdate)
})
+
+ // hot load app
+ module.hot.accept(
+ [ "../src/metadata.js", "../src/routes.js", "../src/store.js" ],
+ () => phenomicClient({
+ metadata: require("../src/metadata.js").default,
+ routes: require("../src/routes.js").default,
+ store: require("../src/store.js").default,
+ })
+ )
}
@@ -1,6 +1,6 @@
-import metadata from "../web_modules/app/metadata"
-import routes from "../web_modules/app/routes"
-import store from "../web_modules/app/store"
+import metadata from "../src/metadata"
+import routes from "../src/routes"
+import store from "../src/store"
import phenomicStatic from "phenomic/lib/static"
@@ -1,11 +1,11 @@
import React, { PropTypes } from "react"
import Helmet from "react-helmet"
-import getLang from "../i18n/getLang"
-import getI18n from "../i18n/get"
-import Header from "../Header"
-import Footer from "../Footer"
-import GoogleAnalyticsTracker from "../GoogleAnalyticsTracker"
+import getLang from "./i18n/getLang"
+import getI18n from "./i18n/get"
+import Header from "./components/Header"
+import Footer from "./components/Footer"
+import GoogleAnalyticsTracker from "./components/GoogleAnalyticsTracker"
const Layout = ({ children, params }, context) => {
const i18n = getI18n(context)
File renamed without changes.
@@ -1,7 +1,7 @@
import React, { PropTypes } from "react"
-import getLang from "../i18n/getLang"
-import getI18n from "../i18n/get"
+import getLang from "../../i18n/getLang"
+import getI18n from "../../i18n/get"
import SVGInline from "react-svg-inline"
import Avatar from "../Avatar"
@@ -53,7 +53,7 @@ const Author = ({ afterName, author, bio, className, isPost }, context) => {
>
<SVGInline
className="putainde-Icon"
- svg={require("../icons/home.svg")}
+ svg={require("../../icons/home.svg")}
cleanup
/>
</a>
@@ -67,7 +67,7 @@ const Author = ({ afterName, author, bio, className, isPost }, context) => {
>
<SVGInline
className="putainde-Icon"
- svg={require("../icons/twitter.svg")}
+ svg={require("../../icons/twitter.svg")}
cleanup
/>
</a>
@@ -81,7 +81,7 @@ const Author = ({ afterName, author, bio, className, isPost }, context) => {
>
<SVGInline
className="putainde-Icon"
- svg={require("../icons/github.svg")}
+ svg={require("../../icons/github.svg")}
cleanup
/>
</a>
@@ -2,8 +2,8 @@ import React, { PropTypes } from "react"
import { Link } from "react-router"
// import getAuthorUri from "../getAuthorUri"
-import getLang from "../i18n/getLang"
-import getI18n from "../i18n/get"
+import getLang from "../../i18n/getLang"
+import getI18n from "../../i18n/get"
const AuthorsList = ({ authors }, context) => {
const { metadata } = context
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,7 +1,7 @@
import React, { PropTypes } from "react"
import Contributor from "../Contributor"
-import getI18n from "../i18n/get"
+import getI18n from "../../i18n/get"
const getGithubUrl
= (repo, action, filename) => `${repo}/${action}/master/content/${filename}`
@@ -2,14 +2,14 @@ import React, { PropTypes } from "react"
import cx from "classnames"
import { Link } from "react-router"
-import getI18n from "../i18n/get"
+import getI18n from "../../i18n/get"
import SVGInline from "react-svg-inline"
const SVGs = {
- github: require("../icons/github.svg"),
- twitter: require("../icons/twitter.svg"),
- facebook: require("../icons/facebook.svg"),
- chat: require("../icons/chat.svg"),
+ github: require("../../icons/github.svg"),
+ twitter: require("../../icons/twitter.svg"),
+ facebook: require("../../icons/facebook.svg"),
+ chat: require("../../icons/chat.svg"),
}
const Footer = ({}, context) => {
@@ -1,8 +1,8 @@
import React, { PropTypes } from "react"
import { Link } from "react-router"
-import getI18n from "../i18n/get"
-import getLang from "../i18n/getLang"
+import getI18n from "../../i18n/get"
+import getLang from "../../i18n/getLang"
import Navigation from "../Navigation"
import SVGInline from "react-svg-inline"
@@ -16,7 +16,7 @@ const Header = ({}, context) => {
<Link className="putainde-SiteTitle" to={`/${getLang(context)}/`}>
<SVGInline
className="putainde-Logo"
- svg={require("../images/putaindecode-logo.svg")}
+ svg={require("../../images/putaindecode-logo.svg")}
cleanupExceptions={[ "fill" ]}
/>
<span>{i18n.title}</span>
File renamed without changes.
@@ -3,7 +3,7 @@ import { Link } from "react-router"
import classes from "./styles.css"
-import getI18n from "../i18n/get"
+import getI18n from "../../i18n/get"
import PostsList from "../PostsList"
const LatestPosts = ({ link, posts, title }, context) => {
@@ -2,17 +2,17 @@ import React, { PropTypes } from "react"
import { Link } from "react-router"
import cx from "classnames"
-import getI18n from "../i18n/get"
+import getI18n from "../../i18n/get"
import SVGInline from "react-svg-inline"
const SVGs = {
- bookmark: require("../icons/bookmark.svg"),
- textFile: require("../icons/text-file.svg"),
- pencil: require("../icons/pencil.svg"),
- github: require("../icons/github.svg"),
- twitter: require("../icons/twitter.svg"),
- facebook: require("../icons/facebook.svg"),
- chat: require("../icons/chat.svg"),
+ bookmark: require("../../icons/bookmark.svg"),
+ textFile: require("../../icons/text-file.svg"),
+ pencil: require("../../icons/pencil.svg"),
+ github: require("../../icons/github.svg"),
+ twitter: require("../../icons/twitter.svg"),
+ facebook: require("../../icons/facebook.svg"),
+ chat: require("../../icons/chat.svg"),
}
import styles from "./styles.css"
@@ -3,8 +3,8 @@ import { Link } from "react-router"
import classes from "./styles.css"
-import getLang from "../i18n/getLang"
-import getI18n from "../i18n/get"
+import getLang from "../../i18n/getLang"
+import getI18n from "../../i18n/get"
import Avatars from "../Avatars"
import AuthorsList from "../AuthorsList"
@@ -1,9 +1,9 @@
import React, { PropTypes } from "react"
import enhanceCollection from "phenomic/lib/enhance-collection"
-import Posts from "../layouts/Posts"
-import getLang from "../i18n/getLang"
-import getI18n from "../i18n/get"
+import Posts from "../../layouts/Posts"
+import getLang from "../../i18n/getLang"
+import getI18n from "../../i18n/get"
const PostsByAuthor = (props, context) => {
const lang = getLang(context)
@@ -1,9 +1,9 @@
import React, { PropTypes } from "react"
import enhanceCollection from "phenomic/lib/enhance-collection"
-import Posts from "../layouts/Posts"
-import getLang from "../i18n/getLang"
-import getI18n from "../i18n/get"
+import Posts from "../../layouts/Posts"
+import getLang from "../../i18n/getLang"
+import getI18n from "../../i18n/get"
const PostsByTag = (props, context) => {
const lang = getLang(context)
@@ -2,7 +2,7 @@ import React, { PropTypes } from "react"
import Contributor from "../Contributor"
-import getI18n from "../i18n/get"
+import getI18n from "../../i18n/get"
const TopContributors = ({ recentContributions }, context) => {
const i18n = getI18n(context)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,7 +1,7 @@
import React, { PropTypes } from "react"
// import getI18n from "../../i18n/get"
-import Contributors from "../../Contributors"
+import Contributors from "../../components/Contributors"
import WithHeroHeader from "../WithHeroHeader"
const AdventCalendar = (props) => (
@@ -4,12 +4,12 @@ import Helmet from "react-helmet"
import { Link } from "react-router"
import enhanceCollection from "phenomic/lib/enhance-collection"
-import supportLocale from "../../browser-locale-support"
+import supportLocale from "../../components/browser-locale-support"
import getLang from "../../i18n/getLang"
import getI18n from "../../i18n/get"
-import I18nBanner from "../../I18nBanner"
-import LatestPosts from "../../LatestPosts"
-import TopContributors from "../../TopContributors"
+import I18nBanner from "../../components/I18nBanner"
+import LatestPosts from "../../components/LatestPosts"
+import TopContributors from "../../components/TopContributors"
import classes from "./styles.css"
File renamed without changes.
@@ -3,8 +3,8 @@ import Helmet from "react-helmet"
import DisqusThread from "react-disqus-thread"
import getI18n from "../../i18n/get"
-import Author from "../../Author"
-import Contributors from "../../Contributors"
+import Author from "../../components/Author"
+import Contributors from "../../components/Contributors"
import WithHeroHeader from "../WithHeroHeader"
const Post = (props, context) => {
@@ -4,7 +4,7 @@ import Helmet from "react-helmet"
import enhanceCollection from "phenomic/lib/enhance-collection"
import getLang from "../../i18n/getLang"
-import PostsList from "../../PostsList"
+import PostsList from "../../components/PostsList"
const Posts = ({ head, posts }, context) => {
const lang = getLang(context)
@@ -2,9 +2,9 @@ import React, { PropTypes } from "react"
import cx from "classnames"
import getI18n from "../../i18n/get"
-import AuthorsList from "../../AuthorsList"
-import formatDate from "../../formatDate"
-import ReadingTime from "../../ReadingTime"
+import AuthorsList from "../../components/AuthorsList"
+import formatDate from "../../components/formatDate"
+import ReadingTime from "../../components/ReadingTime"
function renderCSSBackground(metadata) {
let image = metadata.image
@@ -1,6 +1,6 @@
-import pkg from "../../package.json"
-import i18n from "../i18n"
-import contributors from "../../contributors.json"
+import pkg from "../package.json"
+import i18n from "./i18n"
+import contributors from "../contributors.json"
export default {
pkg,
Oops, something went wrong.

0 comments on commit d612116

Please sign in to comment.