Skip to content

Commit

Permalink
Merge pull request #41 from charliewilco/dep-updates
Browse files Browse the repository at this point in the history
adding updated deps
  • Loading branch information
charliewilco committed Dec 24, 2019
2 parents 0e88ec3 + 8af82e8 commit b144816
Show file tree
Hide file tree
Showing 12 changed files with 2,803 additions and 1,535 deletions.
2 changes: 2 additions & 0 deletions documentation/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" />
44 changes: 10 additions & 34 deletions documentation/next.config.js
Original file line number Diff line number Diff line change
@@ -1,44 +1,20 @@
const { PHASE_PRODUCTION_SERVER } =
process.env.NODE_ENV === 'development'
? {}
: !process.env.NOW_REGION
? require('next/constants')
: require('next-server/constants');

const raw = {
test: /\.txt$/,
use: 'raw-loader'
};

const withMDX = require('@next/mdx')();
const withCSS = require('@zeit/next-css');

const webpack = config => {
config.module.rules.push(raw);
return config;
};

module.exports = (phase, { defaultConfig }) => {
if (phase === PHASE_PRODUCTION_SERVER) {
// Config used to run in production.

return {
pageExtensions: ['js', 'jsx', 'mdx'],
webpack
};
}
// ✅ Put the require call here.

const withCSS = require('@zeit/next-css');
const withTypescript = require('@zeit/next-typescript');
const withMDX = require('@zeit/next-mdx')({
extension: /\.mdx?$/
});

return withTypescript(
withCSS(
withMDX({
target: 'serverless',
pageExtensions: ['js', 'jsx', 'mdx'],
webpack
})
)
);
};
module.exports = withCSS(
withMDX({
target: 'serverless',
pageExtensions: ['tsx', 'js', 'jsx', 'mdx'],
webpack
})
);
20 changes: 9 additions & 11 deletions documentation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,27 @@
"build": "next build",
"types": "tsc --noEmit"
},
"babel": {
"presets": ["next/babel", "@zeit/next-typescript/babel"]
},
"dependencies": {
"@mdx-js/mdx": "^0.15.5",
"@mdx-js/tag": "^0.15.0",
"@mdx-js/loader": "^1.5.3",
"@mdx-js/mdx": "^1.5.3",
"@mdx-js/react": "^1.5.3",
"@mdx-js/tag": "^0.20.3",
"@next/mdx": "^9.1.6",
"@zeit/next-css": "^1.0.1",
"@zeit/next-mdx": "^1.2.0",
"@zeit/next-typescript": "^1.1.1",
"classnames": "^2.2.6",
"next": "^8.1.0",
"next": "^9.1.6",
"obsidian.css": "^3.1.0",
"pretty": "^2.0.0",
"prism-themes": "^1.0.1",
"prismjs": "^1.15.0",
"raw-loader": "^2.0.0",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-ga": "^2.5.3",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-ga": "^2.7.0",
"react-prism": "^4.3.2"
},
"devDependencies": {
"@types/next": "^8.0.4",
"@types/node": "^10.11.7",
"@types/react": "^16.8.14",
"@types/react-dom": "^16.8.4",
Expand Down
28 changes: 8 additions & 20 deletions documentation/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,31 +1,19 @@
import App, { Container } from 'next/app';
import App from 'next/app';
import * as React from 'react';
import Layout from '../components/layout';
import MDXProvider from '@mdx-js/tag/dist/mdx-provider';
import { MDXProvider } from '@mdx-js/react';

import * as components from '../components/markdown-map';

export default class MyApp extends App {
static async getInitialProps({ Component, ctx }) {
let pageProps = {};

if (Component.getInitialProps) {
pageProps = await Component.getInitialProps(ctx);
}

return { pageProps };
}

render() {
public render(): JSX.Element {
const { Component, pageProps } = this.props;
return (
<Container>
<MDXProvider components={components}>
<Layout>
<Component {...pageProps} />
</Layout>
</MDXProvider>
</Container>
<MDXProvider components={components}>
<Layout>
<Component {...pageProps} />
</Layout>
</MDXProvider>
);
}
}
File renamed without changes
File renamed without changes
File renamed without changes.
13 changes: 10 additions & 3 deletions documentation/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"compileOnSave": false,
"compilerOptions": {
"target": "esnext",
"module": "commonjs",
"module": "esnext",
"jsx": "preserve",
"allowJs": true,
"resolveJsonModule": true,
Expand All @@ -15,6 +15,13 @@
"sourceMap": true,
"skipLibCheck": true,
"baseUrl": ".",
"lib": ["dom", "es2016"]
}
"lib": ["dom", "es2016"],
"strict": false,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"isolatedModules": true
},
"exclude": ["node_modules"],
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"]
}
Loading

1 comment on commit b144816

@vercel
Copy link

@vercel vercel bot commented on b144816 Dec 24, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.