Skip to content

Commit

Permalink
fix: Use live reload (#13)
Browse files Browse the repository at this point in the history
* v9.3.2-beta.0

* v9.3.2-beta.1

* v9.3.2-beta.2

* v9.3.2-beta.3

* fix:

* docs: update readme
  • Loading branch information
ScriptedAlchemy committed Apr 9, 2020
1 parent d6ca9e4 commit 7fba66b
Show file tree
Hide file tree
Showing 32 changed files with 183 additions and 387 deletions.
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: 1 addition & 2 deletions examples/with-ant-design-less/.babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
"presets": ["next/babel"],
"plugins": [
[
"import",
{
"import", {
"libraryName": "antd",
"style": true
}
Expand Down
13 changes: 5 additions & 8 deletions examples/with-antd-mobile/.babelrc
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
{
"presets": ["next/babel"],
"presets": ["next/babel"],
"plugins": [
[
"import",
{
"libraryName": "antd-mobile",
"style": "css"
}
]
["import", {
"libraryName": "antd-mobile",
"style": "css"
}]
]
}
10 changes: 8 additions & 2 deletions examples/with-apollo/.babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"presets": ["next/babel"],
"plugins": [["graphql-tag"]]
"presets": [
"next/babel"
],
"plugins": [
[
"graphql-tag"
]
]
}
8 changes: 6 additions & 2 deletions examples/with-custom-babel-config/.babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
"presets": ["next/babel"],
"plugins": ["@babel/plugin-proposal-do-expressions"]
"presets": [
"next/babel"
],
"plugins": [
"@babel/plugin-proposal-do-expressions"
]
}
4 changes: 3 additions & 1 deletion examples/with-custom-reverse-proxy/.babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{
"presets": ["next/babel"]
"presets": [
"next/babel"
]
}
8 changes: 6 additions & 2 deletions examples/with-flow/.babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
"presets": ["next/babel"],
"plugins": ["transform-flow-strip-types"]
"presets": [
"next/babel"
],
"plugins": [
"transform-flow-strip-types"
]
}
56 changes: 21 additions & 35 deletions examples/with-flow/flow-typed/next.js.flow
Original file line number Diff line number Diff line change
@@ -1,49 +1,35 @@
// @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,
renderToHTML(req: any, res: any, pathname: string, query: string): string,
renderError(err: Error, req: any, res: any, pathname: any, query: any): any,
renderErrorToHTML(
err: Error,
req: any,
res: any,
pathname: string,
query: any
): string,
}
prepare(): Promise<void>;
getRequestHandler(): any;
render(req: any, res: any, pathname: string, query: any): any;
renderToHTML(req: any, res: any, pathname: string, query: string): string;
renderError(err: Error, req: any, res: any, pathname: any, query: any): any;
renderErrorToHTML(err: Error, req: any, res: any, pathname: string, query: any): string;
};
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?: boolean }, any>
>
declare module "next/link" {
declare module.exports: Class<React$Component<{href: string, prefetch?: bool}, 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: 6 additions & 1 deletion examples/with-glamor/.babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"presets": ["next/babel"],
"plugins": [["transform-react-jsx", { "pragma": "Glamor.createElement" }]]
"plugins": [
[
"transform-react-jsx",
{ "pragma": "Glamor.createElement" }
]
]
}
4 changes: 2 additions & 2 deletions examples/with-jest/__tests__/__snapshots__/snapshot.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ exports[`renders homepage unchanged 1`] = `
<h1
className="title"
>
Welcome to
Welcome to
<a
href="https://nextjs.org"
>
Expand Down Expand Up @@ -78,7 +78,7 @@ exports[`renders homepage unchanged 1`] = `
rel="noopener noreferrer"
target="_blank"
>
Powered by
Powered by
<img
alt="ZEIT Logo"
src="/zeit.svg"
Expand Down
2 changes: 1 addition & 1 deletion examples/with-jest/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const Home = () => (
</h1>

<p className={styles.description}>
Get started by editing<code>pages/index.js</code>
Get started by editing <code>pages/index.js</code>
</p>

<div className={styles.grid}>
Expand Down
5 changes: 4 additions & 1 deletion examples/with-linaria/.babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"presets": ["next/babel", "linaria/babel"]
"presets": [
"next/babel",
"linaria/babel"
]
}
8 changes: 6 additions & 2 deletions examples/with-lingui/.babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
"presets": ["next/babel"],
"plugins": ["macros"]
"presets": [
"next/babel"
],
"plugins": [
"macros"
]
}
4 changes: 3 additions & 1 deletion examples/with-mobx-react-lite/.babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{
"presets": ["next/babel"]
"presets": [
"next/babel"
]
}
8 changes: 6 additions & 2 deletions examples/with-mobx-state-tree/.babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
"presets": ["next/babel"],
"plugins": [["@babel/plugin-proposal-decorators", { "legacy": true }]]
"presets": [
"next/babel"
],
"plugins": [
["@babel/plugin-proposal-decorators", { "legacy": true }]
]
}
4 changes: 3 additions & 1 deletion examples/with-mobx/.babelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"presets": ["next/babel"],
"presets": [
"next/babel"
],
"plugins": [
["@babel/plugin-proposal-decorators", { "legacy": true }],
["@babel/plugin-proposal-class-properties", { "loose": true }]
Expand Down
5 changes: 1 addition & 4 deletions examples/with-orbit-components/.babelrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"presets": ["next/babel"],
"plugins": [
["styled-components", { "ssr": true }],
"@kiwicom/babel-plugin-orbit-components"
]
"plugins": [["styled-components", { "ssr": true }], "@kiwicom/babel-plugin-orbit-components"]
}
8 changes: 6 additions & 2 deletions examples/with-reasonml-todo/.babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
"presets": ["next/babel"],
"plugins": ["babel-plugin-bucklescript"]
"presets": [
"next/babel"
],
"plugins": [
"babel-plugin-bucklescript"
]
}
8 changes: 6 additions & 2 deletions examples/with-reasonml/.babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
"presets": ["next/babel"],
"plugins": ["babel-plugin-bucklescript"]
"presets": [
"next/babel"
],
"plugins": [
"babel-plugin-bucklescript"
]
}
9 changes: 4 additions & 5 deletions examples/with-rebass/.babelrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"presets": ["next/babel"],
"presets": [
"next/babel"
],
"plugins": [
[
"styled-components",
{ "ssr": true, "displayName": true, "preprocess": false }
]
["styled-components", { "ssr": true, "displayName": true, "preprocess": false } ]
]
}
8 changes: 6 additions & 2 deletions examples/with-relay-modern/.babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
"presets": ["next/babel"],
"plugins": ["relay"]
"presets": [
"next/babel"
],
"plugins": [
"relay"
]
}
8 changes: 6 additions & 2 deletions examples/with-style-sheet/.babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
"presets": ["next/babel"],
"plugins": ["style-sheet/babel"]
"presets": [
"next/babel"
],
"plugins": [
"style-sheet/babel"
]
}
4 changes: 3 additions & 1 deletion examples/with-styled-jsx-plugins/.babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"next/babel",
{
"styled-jsx": {
"plugins": ["styled-jsx-plugin-postcss"]
"plugins": [
"styled-jsx-plugin-postcss"
]
}
}
]
Expand Down
4 changes: 3 additions & 1 deletion examples/with-styled-jsx-scss/.babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"next/babel",
{
"styled-jsx": {
"plugins": ["styled-jsx-plugin-sass"]
"plugins": [
"styled-jsx-plugin-sass"
]
}
}
]
Expand Down
8 changes: 4 additions & 4 deletions examples/with-typescript-graphql/lib/type-defs.graphqls
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
type User {
id: ID!
name: String!
status: String!
id: ID!
name: String!
status: String!
}

type Query {
viewer: User!
viewer: User!
}
10 changes: 5 additions & 5 deletions examples/with-typescript-graphql/lib/viewer.graphql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
query Viewer {
viewer {
id
name
status
}
viewer {
id
name
status
}
}
6 changes: 0 additions & 6 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,4 @@ module.exports = {
globalSetup: '<rootDir>/jest-global-setup.js',
globalTeardown: '<rootDir>/jest-global-teardown.js',
testEnvironment: '<rootDir>/jest-environment.js',
"reporters": [
"default",
["jest-html-reporter", {
"pageTitle": "Test Report"
}]
]
}
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
"browserstack-local": "1.4.0",
"caniuse-lite": "^1.0.30001019",
"cheerio": "0.22.0",
"chromedriver": "80.0.1",
"clone": "2.1.2",
"cookie": "0.4.0",
"coveralls": "3.0.3",
Expand All @@ -77,7 +76,6 @@
"get-port": "5.0.0",
"isomorphic-unfetch": "3.0.0",
"jest-cli": "24.9.0",
"jest-html-reporter": "2.8.2",
"lerna": "3.14.1",
"lint-staged": "9.4.2",
"moment": "^2.24.0",
Expand Down Expand Up @@ -106,8 +104,7 @@
"tree-kill": "1.2.1",
"typescript": "3.7.3",
"wait-port": "0.2.2",
"webpack-bundle-analyzer": "3.6.1",
"webpack-livereload-plugin": "2.3.0"
"webpack-bundle-analyzer": "3.6.1"
},
"resolutions": {
"browserslist": "^4.8.3",
Expand Down
Loading

0 comments on commit 7fba66b

Please sign in to comment.