Skip to content

Commit

Permalink
Merge pull request #3 from yuku/update-dependencies
Browse files Browse the repository at this point in the history
Update dependencies
  • Loading branch information
yuku authored Aug 30, 2019
2 parents e821a17 + 7abeb51 commit 1c5414c
Show file tree
Hide file tree
Showing 9 changed files with 838 additions and 1,180 deletions.
2 changes: 2 additions & 0 deletions next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/// <reference types="next" />
/// <reference types="next/types/global" />
23 changes: 10 additions & 13 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const path = require("path")

const withSass = require("@zeit/next-sass")
const withTypescript = require("@zeit/next-typescript")

const github = require("remark-github")
const math = require("remark-math")
Expand Down Expand Up @@ -34,17 +33,15 @@ const withIpynb = nextConfig => ({
},
})

module.exports = withTypescript(
withSass(
withMDX(
withIpynb({
exportPathMap(defaultMap) {
return {
...defaultMap,
"/404.html": { page: "/_error" },
}
},
}),
),
module.exports = withSass(
withMDX(
withIpynb({
exportPathMap(defaultMap) {
return {
...defaultMap,
"/404.html": { page: "/_error" },
}
},
}),
),
)
25 changes: 11 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"node": "12"
},
"scripts": {
"build:entries": "ts-node script/build-entries.ts",
"build:entries": "node ./script/build-entries.js",
"build:next": "next build && next export && touch ./out/.nojekyll && echo yuku.takahashi.coffee > ./out/CNAME",
"build": "run-s build:entries build:next",
"deploy": "gh-pages -d out -b master -t",
Expand All @@ -18,15 +18,14 @@
},
"dependencies": {
"@mapbox/rehype-prism": "^0.3.1",
"@mdx-js/loader": "^1.3.0",
"@mdx-js/mdx": "^1.3.0",
"@mdx-js/loader": "^1.4.0",
"@mdx-js/mdx": "^1.4.0",
"@types/classnames": "^2.2.6",
"@types/glob": "^7.1.1",
"@types/next": "^7.0.5",
"@types/react": "^16.7.18",
"@types/next": "^8.0.6",
"@types/react": "^16.9.2",
"@zeit/next-mdx": "^1.2.0",
"@zeit/next-sass": "^1.0.1",
"@zeit/next-typescript": "^1.1.1",
"babel-loader": "^8.0.5",
"babel-preset-react": "^6.24.1",
"bootstrap": "^4.2.1",
Expand All @@ -37,29 +36,28 @@
"htmltojsx": "^0.3.0",
"lodash.debounce": "^4.0.8",
"moment": "^2.23.0",
"next": "^7.0.2",
"next": "^9.0.5",
"next-ga": "^2.3.4",
"node-sass": "^4.12.0",
"notebookjs": "^0.4.2",
"null-loader": "^0.1.1",
"react": "^16.7.0",
"react-dom": "^16.7.0",
"react": "^16.9.0",
"react-dom": "^16.9.0",
"rehype-katex": "^1.2.0",
"rehype-parse": "^6.0.1",
"rehype-stringify": "^6.0.0",
"remark-github": "^8.0.0",
"remark-math": "^1.0.6",
"remark-parse": "^7.0.1",
"remark-rehype": "^5.0.0",
"ts-node": "^7.0.1",
"typescript": "^3.2.2",
"unified": "^8.3.2",
"webpack": "^4.28.4"
"webpack": "^4.39.3"
},
"devDependencies": {
"npm-run-all": "^4.1.5",
"onchange": "^5.2.0",
"prettier": "^1.15.3",
"prettier": "^1.18.2",
"tslint": "^5.12.0",
"tslint-config-prettier": "^1.17.0"
},
Expand All @@ -70,8 +68,7 @@
},
"babel": {
"presets": [
"next/babel",
"@zeit/next-typescript/babel"
"next/babel"
]
}
}
6 changes: 3 additions & 3 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react"
import App, { Container } from "next/app"
import App from "next/app"
import Head from "next/head"
import Router from "next/router"
import withGA from "next-ga"
Expand All @@ -14,7 +14,7 @@ class MyApp extends App {
const { Component, pageProps } = this.props

return (
<Container>
<>
<Head>
<meta charSet="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
Expand Down Expand Up @@ -44,7 +44,7 @@ class MyApp extends App {
<Layout>
<Component {...pageProps} />
</Layout>
</Container>
</>
)
}
}
Expand Down
6 changes: 3 additions & 3 deletions script/build-entries.ts → script/build-entries.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const writeFile = utils.promisify(fs.writeFile)

const ROOT = path.resolve(__dirname, "../")

function createPageForMdx(entryName: string, pathname: string) {
function createPageForMdx(entryName, pathname) {
return `
import React from "react"
Expand Down Expand Up @@ -42,7 +42,7 @@ function createPageForMdx(entryName: string, pathname: string) {
`
}

function createPageForIpynb(entryName: string, pathname: string) {
function createPageForIpynb(entryName, pathname) {
return `
import React from "react"
Expand Down Expand Up @@ -72,7 +72,7 @@ function createPageForIpynb(entryName: string, pathname: string) {
`
}

async function createPage(entryPath: string) {
async function createPage(entryPath) {
const type = entryPath.split(".")[1]
if (type) {
const func = type === "mdx" ? createPageForMdx : createPageForIpynb
Expand Down
3 changes: 2 additions & 1 deletion src/components/Blog/Layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React from "react"
import Head from "next/head"
import Link from "next/link"
import { withRouter, WithRouterProps } from "next/router"
import { withRouter } from "next/router"
import { WithRouterProps } from "next/dist/client/with-router"
import cn from "classnames"
import moment from "moment"

Expand Down
3 changes: 2 additions & 1 deletion src/components/Layout/SideMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Link from "next/link"
import { withRouter, WithRouterProps } from "next/router"
import { withRouter } from "next/router"
import { WithRouterProps } from "next/dist/client/with-router"
import cn from "classnames"

import { SITE_NAME } from "../../constants"
Expand Down
9 changes: 7 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"target": "esnext"
}
"target": "esnext",
"esModuleInterop": true,
"resolveJsonModule": true,
"isolatedModules": true
},
"exclude": ["node_modules"],
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "script/build-entries.js", "script/build-entries.js"]
}
Loading

0 comments on commit 1c5414c

Please sign in to comment.