Skip to content

Commit

Permalink
Merge branch 'canary' into configure-webpack-environment
Browse files Browse the repository at this point in the history
  • Loading branch information
Jens Meindertsma authored Sep 14, 2020
2 parents 03df853 + 1d30f21 commit ff3bc23
Show file tree
Hide file tree
Showing 66 changed files with 178 additions and 219 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ type Props = {
dateString: string
}

const DateFormater = ({ dateString }: Props) => {
const DateFormatter = ({ dateString }: Props) => {
const date = parseISO(dateString)
return <time dateTime={dateString}>{format(date, 'LLLL d, yyyy')}</time>
}

export default DateFormater
export default DateFormatter
4 changes: 2 additions & 2 deletions examples/blog-starter-typescript/components/hero-post.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Avatar from './avatar'
import DateFormater from './date-formater'
import DateFormatter from './date-formatter'
import CoverImage from './cover-image'
import Link from 'next/link'
import Author from '../types/author'
Expand Down Expand Up @@ -34,7 +34,7 @@ const HeroPost = ({
</Link>
</h3>
<div className="mb-4 md:mb-0 text-lg">
<DateFormater dateString={date} />
<DateFormatter dateString={date} />
</div>
</div>
<div>
Expand Down
4 changes: 2 additions & 2 deletions examples/blog-starter-typescript/components/post-header.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Avatar from './avatar'
import DateFormater from './date-formater'
import DateFormatter from './date-formatter'
import CoverImage from './cover-image'
import PostTitle from './post-title'
import Author from '../types/author'
Expand All @@ -26,7 +26,7 @@ const PostHeader = ({ title, coverImage, date, author }: Props) => {
<Avatar name={author.name} picture={author.picture} />
</div>
<div className="mb-6 text-lg">
<DateFormater dateString={date} />
<DateFormatter dateString={date} />
</div>
</div>
</>
Expand Down
4 changes: 2 additions & 2 deletions examples/blog-starter-typescript/components/post-preview.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Avatar from './avatar'
import DateFormater from './date-formater'
import DateFormatter from './date-formatter'
import CoverImage from './cover-image'
import Link from 'next/link'
import Author from '../types/author'
Expand Down Expand Up @@ -32,7 +32,7 @@ const PostPreview = ({
</Link>
</h3>
<div className="text-lg mb-4">
<DateFormater dateString={date} />
<DateFormatter dateString={date} />
</div>
<p className="text-lg leading-relaxed mb-4">{excerpt}</p>
<Avatar name={author.name} picture={author.picture} />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { parseISO, format } from 'date-fns'

export default function DateFormater({ dateString }) {
export default function DateFormatter({ dateString }) {
const date = parseISO(dateString)
return <time dateTime={dateString}>{format(date, 'LLLL d, yyyy')}</time>
}
4 changes: 2 additions & 2 deletions examples/blog-starter/components/hero-post.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Avatar from '../components/avatar'
import DateFormater from '../components/date-formater'
import DateFormatter from '../components/date-formatter'
import CoverImage from '../components/cover-image'
import Link from 'next/link'

Expand All @@ -24,7 +24,7 @@ export default function HeroPost({
</Link>
</h3>
<div className="mb-4 md:mb-0 text-lg">
<DateFormater dateString={date} />
<DateFormatter dateString={date} />
</div>
</div>
<div>
Expand Down
4 changes: 2 additions & 2 deletions examples/blog-starter/components/post-header.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Avatar from '../components/avatar'
import DateFormater from '../components/date-formater'
import DateFormatter from '../components/date-formatter'
import CoverImage from '../components/cover-image'
import PostTitle from '../components/post-title'

Expand All @@ -18,7 +18,7 @@ export default function PostHeader({ title, coverImage, date, author }) {
<Avatar name={author.name} picture={author.picture} />
</div>
<div className="mb-6 text-lg">
<DateFormater dateString={date} />
<DateFormatter dateString={date} />
</div>
</div>
</>
Expand Down
4 changes: 2 additions & 2 deletions examples/blog-starter/components/post-preview.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Avatar from '../components/avatar'
import DateFormater from '../components/date-formater'
import DateFormatter from '../components/date-formatter'
import CoverImage from './cover-image'
import Link from 'next/link'

Expand All @@ -22,7 +22,7 @@ export default function PostPreview({
</Link>
</h3>
<div className="text-lg mb-4">
<DateFormater dateString={date} />
<DateFormatter dateString={date} />
</div>
<p className="text-lg leading-relaxed mb-4">{excerpt}</p>
<Avatar name={author.name} picture={author.picture} />
Expand Down
2 changes: 1 addition & 1 deletion examples/cms-kontent/components/date-formater.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { parseISO, format } from 'date-fns'

export default function DateFormater({ dateString }) {
export default function DateFormatter({ dateString }) {
const date = parseISO(dateString)
return <time dateTime={dateString}>{format(date, 'LLLL d, yyyy')}</time>
}
4 changes: 2 additions & 2 deletions examples/cms-kontent/components/hero-post.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Avatar from '../components/avatar'
import DateFormater from '../components/date-formater'
import DateFormatter from '../components/date-formatter'
import CoverImage from '../components/cover-image'
import Link from 'next/link'

Expand All @@ -24,7 +24,7 @@ export default function HeroPost({
</Link>
</h3>
<div className="mb-4 md:mb-0 text-lg">
<DateFormater dateString={date} />
<DateFormatter dateString={date} />
</div>
</div>
<div>
Expand Down
4 changes: 2 additions & 2 deletions examples/cms-kontent/components/post-header.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Avatar from '../components/avatar'
import DateFormater from '../components/date-formater'
import DateFormatter from '../components/date-formatter'
import CoverImage from '../components/cover-image'
import PostTitle from '../components/post-title'

Expand All @@ -18,7 +18,7 @@ export default function PostHeader({ title, coverImage, date, author }) {
<Avatar name={author.name} picture={author.picture} />
</div>
<div className="mb-6 text-lg">
<DateFormater dateString={date} />
<DateFormatter dateString={date} />
</div>
</div>
</>
Expand Down
4 changes: 2 additions & 2 deletions examples/cms-kontent/components/post-preview.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Avatar from '../components/avatar'
import DateFormater from '../components/date-formater'
import DateFormatter from '../components/date-formatter'
import CoverImage from './cover-image'
import Link from 'next/link'

Expand All @@ -22,7 +22,7 @@ export default function PostPreview({
</Link>
</h3>
<div className="text-lg mb-4">
<DateFormater dateString={date} />
<DateFormatter dateString={date} />
</div>
<p className="text-lg leading-relaxed mb-4">{excerpt}</p>
<Avatar name={author.name} picture={author.picture} />
Expand Down
4 changes: 2 additions & 2 deletions examples/svg-components/.babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"presets": [ "next/babel" ],
"plugins": [ "inline-react-svg" ]
"presets": ["next/babel"],
"plugins": ["inline-react-svg"]
}
3 changes: 2 additions & 1 deletion examples/with-ant-design-less/.babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"presets": ["next/babel"],
"plugins": [
[
"import", {
"import",
{
"libraryName": "antd",
"style": true
}
Expand Down
13 changes: 8 additions & 5 deletions examples/with-ant-design-mobile/.babelrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
{
"presets": ["next/babel"],
"presets": ["next/babel"],
"plugins": [
["import", {
"libraryName": "antd-mobile",
"style": "css"
}]
[
"import",
{
"libraryName": "antd-mobile",
"style": "css"
}
]
]
}
6 changes: 2 additions & 4 deletions examples/with-ant-design-pro-layout-less/.babelrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"presets": [
"next/babel"
],
"presets": ["next/babel"],
"plugins": [
[
"import",
Expand All @@ -11,4 +9,4 @@
}
]
]
}
}
8 changes: 2 additions & 6 deletions examples/with-cssed/.babelrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
{
"presets": [
"next/babel"
],
"plugins": [
"babel-plugin-macros"
]
"presets": ["next/babel"],
"plugins": ["babel-plugin-macros"]
}
8 changes: 2 additions & 6 deletions examples/with-custom-babel-config/.babelrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
{
"presets": [
"next/babel"
],
"plugins": [
"@babel/plugin-proposal-do-expressions"
]
"presets": ["next/babel"],
"plugins": ["@babel/plugin-proposal-do-expressions"]
}
4 changes: 1 addition & 3 deletions examples/with-custom-reverse-proxy/.babelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{
"presets": [
"next/babel"
]
"presets": ["next/babel"]
}
6 changes: 3 additions & 3 deletions examples/with-filbert/.babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"presets": ["next/babel"],
"plugins": ["macros"]
}
"presets": ["next/babel"],
"plugins": ["macros"]
}
10 changes: 3 additions & 7 deletions examples/with-flow/.babelrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
{
"presets": [
"next/babel"
],
"plugins": [
"transform-flow-strip-types"
]
}
"presets": ["next/babel"],
"plugins": ["transform-flow-strip-types"]
}
44 changes: 26 additions & 18 deletions examples/with-flow/flow-typed/next.js.flow
Original file line number Diff line number Diff line change
@@ -1,32 +1,40 @@
// @flow

declare module "next" {
declare module 'next' {
declare type NextApp = {
prepare(): Promise<void>;
getRequestHandler(): any;
render(req: any, res: any, pathname: string, query: any): any;
};
prepare(): Promise<void>,
getRequestHandler(): any,
render(req: any, res: any, pathname: string, query: any): any,
}
declare module.exports: (...opts: any) => NextApp
}

declare module "next/head" {
declare module.exports: Class<React$Component<any, any>>;
declare module 'next/head' {
declare module.exports: Class<React$Component<any, any>>
}

declare module "next/link" {
declare module.exports: Class<React$Component<{href: string, prefetch?: bool}, any>>;
declare module 'next/link' {
declare module.exports: Class<
React$Component<{ href: string, prefetch?: boolean }, any>
>
}

declare module "next/error" {
declare module.exports: Class<React$Component<{statusCode: number}, any>>;
declare module 'next/error' {
declare module.exports: Class<React$Component<{ statusCode: number }, any>>
}

declare module "next/document" {
declare export var Head: Class<React$Component<any, any>>;
declare export var Main: Class<React$Component<any, any>>;
declare export var NextScript: Class<React$Component<any, any>>;
declare module 'next/document' {
declare export var Head: Class<React$Component<any, any>>
declare export var Main: Class<React$Component<any, any>>
declare export var NextScript: Class<React$Component<any, any>>
declare export default Class<React$Component<any, any>> & {
getInitialProps: (ctx: {pathname: string, query: any, req?: any, res?: any, err?: any}) => Promise<any>;
renderPage(cb: Function): void;
};
getInitialProps: (ctx: {
pathname: string,
query: any,
req?: any,
res?: any,
err?: any,
}) => Promise<any>,
renderPage(cb: Function): void,
}
}
7 changes: 1 addition & 6 deletions examples/with-glamor/.babelrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
{
"presets": ["next/babel"],
"plugins": [
[
"transform-react-jsx",
{ "pragma": "Glamor.createElement" }
]
]
"plugins": [["transform-react-jsx", { "pragma": "Glamor.createElement" }]]
}
5 changes: 1 addition & 4 deletions examples/with-linaria/.babelrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{
"presets": [
"next/babel",
"linaria/babel"
]
"presets": ["next/babel", "linaria/babel"]
}
10 changes: 3 additions & 7 deletions examples/with-lingui/.babelrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
{
"presets": [
"next/babel"
],
"plugins": [
"macros"
]
}
"presets": ["next/babel"],
"plugins": ["macros"]
}
4 changes: 1 addition & 3 deletions examples/with-mobx-react-lite/.babelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{
"presets": [
"next/babel"
]
"presets": ["next/babel"]
}
8 changes: 2 additions & 6 deletions examples/with-mobx-state-tree/.babelrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
{
"presets": [
"next/babel"
],
"plugins": [
["@babel/plugin-proposal-decorators", { "legacy": true }]
]
"presets": ["next/babel"],
"plugins": [["@babel/plugin-proposal-decorators", { "legacy": true }]]
}
4 changes: 1 addition & 3 deletions examples/with-mobx/.babelrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"presets": [
"next/babel"
],
"presets": ["next/babel"],
"plugins": [
["@babel/plugin-proposal-decorators", { "legacy": true }],
["@babel/plugin-proposal-class-properties", { "loose": true }]
Expand Down
2 changes: 1 addition & 1 deletion examples/with-mocha/.babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
"presets": [["next/babel", { "preset-env": { "modules": "commonjs" } }]]
}
}
}
}
Loading

0 comments on commit ff3bc23

Please sign in to comment.