language stringclasses 1
value | owner stringlengths 2 15 | repo stringlengths 2 21 | sha stringlengths 45 45 | message stringlengths 7 36.3k | path stringlengths 1 199 | patch stringlengths 15 102k | is_multipart bool 2
classes |
|---|---|---|---|---|---|---|---|
Other | vercel | next.js | f14297dc80346fcb6e77c7ed5279f1df47ec0388.json | Normalize example package.json files (#2350) | examples/with-material-ui/package.json | @@ -1,4 +1,6 @@
{
+ "name": "with-material-ui",
+ "version": "1.0.0",
"dependencies": {
"material-ui": "^0.18.0",
"next": "latest", | true |
Other | vercel | next.js | f14297dc80346fcb6e77c7ed5279f1df47ec0388.json | Normalize example package.json files (#2350) | examples/with-mobx/package.json | @@ -13,7 +13,6 @@
"react": "^15.4.2",
"react-dom": "^15.4.2"
},
- "author": "",
"license": "ISC",
"devDependencies": {
"babel-plugin-transform-decorators-legacy": "^1.3.4" | true |
Other | vercel | next.js | f14297dc80346fcb6e77c7ed5279f1df47ec0388.json | Normalize example package.json files (#2350) | examples/with-next-routes/package.json | @@ -1,4 +1,6 @@
{
+ "name": "with-next-routes",
+ "version": "1.0.0",
"scripts": {
"dev": "node server.js",
"build": "next build", | true |
Other | vercel | next.js | f14297dc80346fcb6e77c7ed5279f1df47ec0388.json | Normalize example package.json files (#2350) | examples/with-pretty-url-routing/package.json | @@ -1,4 +1,6 @@
{
+ "name": "with-pretty-url-routing",
+ "version": "1.0.0",
"scripts": {
"dev": "node server.js",
"build": "next build", | true |
Other | vercel | next.js | f14297dc80346fcb6e77c7ed5279f1df47ec0388.json | Normalize example package.json files (#2350) | examples/with-react-ga/package.json | @@ -1,13 +1,13 @@
{
- "name": "hello-world",
+ "name": "with-react-ga",
"version": "1.0.0",
"scripts": {
"dev": "next",
"build": "next build",
"start": "next start"
},
"dependencies": {
- "next": "*",
+ "next": "latest",
"react": "^15.4.2",
"react-dom": "^15.4.2",
"rea... | true |
Other | vercel | next.js | f14297dc80346fcb6e77c7ed5279f1df47ec0388.json | Normalize example package.json files (#2350) | examples/with-react-intl/package.json | @@ -16,6 +16,5 @@
"react-dom": "^15.4.2",
"react-intl": "^2.2.3"
},
- "author": "",
"license": "ISC"
} | true |
Other | vercel | next.js | f14297dc80346fcb6e77c7ed5279f1df47ec0388.json | Normalize example package.json files (#2350) | examples/with-react-md/package.json | @@ -14,6 +14,5 @@
"react-dom": "^15.4.2",
"react-md": "^1.0.1"
},
- "author": "",
"license": "ISC"
} | true |
Other | vercel | next.js | f14297dc80346fcb6e77c7ed5279f1df47ec0388.json | Normalize example package.json files (#2350) | examples/with-redux/package.json | @@ -16,6 +16,5 @@
"redux": "^3.6.0",
"redux-thunk": "^2.1.0"
},
- "author": "",
"license": "ISC"
} | true |
Other | vercel | next.js | f14297dc80346fcb6e77c7ed5279f1df47ec0388.json | Normalize example package.json files (#2350) | examples/with-refnux/package.json | @@ -1,12 +1,9 @@
{
- "name": "next.js-example-with-refnux",
+ "name": "with-refnux",
"version": "1.0.0",
- "description": "",
- "main": "index.js",
"scripts": {
"next": "next"
},
- "author": "",
"license": "ISC",
"dependencies": {
"next": "latest", | true |
Other | vercel | next.js | f14297dc80346fcb6e77c7ed5279f1df47ec0388.json | Normalize example package.json files (#2350) | examples/with-scoped-stylesheets-and-postcss/package.json | @@ -1,7 +1,6 @@
{
- "name": "next.js-with-scoped-stylesheets-and-postcss",
+ "name": "with-scoped-stylesheets-and-postcss",
"version": "1.0.0",
- "description": "",
"scripts": {
"dev": "next dev",
"build": "next build", | true |
Other | vercel | next.js | f14297dc80346fcb6e77c7ed5279f1df47ec0388.json | Normalize example package.json files (#2350) | examples/with-semantic-ui/package.json | @@ -12,6 +12,5 @@
"react-dom": "^15.4.2",
"semantic-ui-react": "^0.68.0"
},
- "author": "",
"license": "ISC"
} | true |
Other | vercel | next.js | f14297dc80346fcb6e77c7ed5279f1df47ec0388.json | Normalize example package.json files (#2350) | examples/with-shallow-routing/package.json | @@ -11,6 +11,5 @@
"react": "^15.4.2",
"react-dom": "^15.4.2"
},
- "author": "",
"license": "ISC"
} | true |
Other | vercel | next.js | f14297dc80346fcb6e77c7ed5279f1df47ec0388.json | Normalize example package.json files (#2350) | examples/with-socket.io/package.json | @@ -1,4 +1,6 @@
{
+ "name": "with-socket.io",
+ "version": "1.0.0",
"dependencies": {
"express": "^4.15.2",
"isomorphic-fetch": "^2.2.1", | true |
Other | vercel | next.js | f14297dc80346fcb6e77c7ed5279f1df47ec0388.json | Normalize example package.json files (#2350) | examples/with-styled-components/package.json | @@ -13,6 +13,5 @@
"react-dom": "^15.4.2",
"styled-components": "^2.0.0-17"
},
- "author": "",
"license": "ISC"
} | true |
Other | vercel | next.js | f14297dc80346fcb6e77c7ed5279f1df47ec0388.json | Normalize example package.json files (#2350) | examples/with-sw-precache/package.json | @@ -1,4 +1,6 @@
{
+ "name": "with-sw-precache",
+ "version": "1.0.0",
"scripts": {
"build": "next build",
"start": "NODE_ENV=production node server.js" | true |
Other | vercel | next.js | f14297dc80346fcb6e77c7ed5279f1df47ec0388.json | Normalize example package.json files (#2350) | examples/with-typescript/package.json | @@ -1,4 +1,6 @@
{
+ "name": "with-typescript",
+ "version": "1.0.0",
"scripts": {
"dev": "concurrently \"tsc --watch\" next"
}, | true |
Other | vercel | next.js | f14297dc80346fcb6e77c7ed5279f1df47ec0388.json | Normalize example package.json files (#2350) | examples/with-universal-configuration/package.json | @@ -1,5 +1,5 @@
{
- "name": "with-env",
+ "name": "with-universal-configuration",
"version": "1.0.0",
"scripts": {
"dev": "next",
@@ -14,6 +14,5 @@
"devDependencies": {
"babel-plugin-transform-define": "^1.2.0"
},
- "author": "",
"license": "ISC"
} | true |
Other | vercel | next.js | f14297dc80346fcb6e77c7ed5279f1df47ec0388.json | Normalize example package.json files (#2350) | examples/with-url-object-routing/package.json | @@ -1,4 +1,6 @@
{
+ "name": "with-url-object-routing",
+ "version": "1.0.0",
"scripts": {
"dev": "node server.js",
"build": "next build", | true |
Other | vercel | next.js | f14297dc80346fcb6e77c7ed5279f1df47ec0388.json | Normalize example package.json files (#2350) | examples/with-webpack-bundle-analyzer/package.json | @@ -13,6 +13,5 @@
"react-dom": "^15.4.2",
"webpack-bundle-analyzer": "^2.3.0"
},
- "author": "",
"license": "ISC"
} | true |
Other | vercel | next.js | 949296baf169c621bb4b17787effb23d95bc3c61.json | Upgrade styled-jsx@beta to latest version (#3045) | package.json | @@ -91,7 +91,7 @@
"send": "0.15.6",
"source-map-support": "0.4.18",
"strip-ansi": "4.0.0",
- "styled-jsx": "^2.0.0-beta.1",
+ "styled-jsx": "2.0.1-beta.2",
"touch": "3.1.0",
"unfetch": "3.0.0",
"url": "0.11.0", | true |
Other | vercel | next.js | 949296baf169c621bb4b17787effb23d95bc3c61.json | Upgrade styled-jsx@beta to latest version (#3045) | yarn.lock | @@ -6269,9 +6269,9 @@ strip-json-comments@~2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
-styled-jsx@^2.0.0-beta.1:
- version "2.0.0-beta1"
- resolved "https://registry.yarnpkg.com/styled-jsx/-/styled... | true |
Other | vercel | next.js | a79357f2a4bc8eca1bcc64ff30c411fee4842d98.json | Allow use of filenames in exportPathMap (#2973)
* allow use of filenames in exportPathMap
* add link test and handling for file paths when flattening links for export
* add note about exporting file paths to readme.md | lib/router/index.js | @@ -101,7 +101,12 @@ export function _rewriteUrlForNextExport (url) {
let [path, qs] = url.split('?')
path = path.replace(/\/$/, '')
- let newPath = `${path}/`
+ let newPath = path
+ // Append a trailing slash if this path does not have an extension
+ if (!/\.[^/]+\/?$/.test(path)) {
+ newPath = `${path}... | true |
Other | vercel | next.js | a79357f2a4bc8eca1bcc64ff30c411fee4842d98.json | Allow use of filenames in exportPathMap (#2973)
* allow use of filenames in exportPathMap
* add link test and handling for file paths when flattening links for export
* add note about exporting file paths to readme.md | readme.md | @@ -1064,6 +1064,7 @@ module.exports = {
return {
'/': { page: '/' },
'/about': { page: '/about' },
+ '/readme.md': { page: '/readme' },
'/p/hello-nextjs': { page: '/post', query: { title: 'hello-nextjs' } },
'/p/learn-nextjs': { page: '/post', query: { title: 'learn-nextjs' } },
... | true |
Other | vercel | next.js | a79357f2a4bc8eca1bcc64ff30c411fee4842d98.json | Allow use of filenames in exportPathMap (#2973)
* allow use of filenames in exportPathMap
* add link test and handling for file paths when flattening links for export
* add note about exporting file paths to readme.md | server/export.js | @@ -2,7 +2,7 @@ import del from 'del'
import cp from 'recursive-copy'
import mkdirp from 'mkdirp-then'
import walk from 'walk'
-import { resolve, join, dirname, sep } from 'path'
+import { extname, resolve, join, dirname, sep } from 'path'
import { existsSync, readFileSync, writeFileSync } from 'fs'
import getConf... | true |
Other | vercel | next.js | a79357f2a4bc8eca1bcc64ff30c411fee4842d98.json | Allow use of filenames in exportPathMap (#2973)
* allow use of filenames in exportPathMap
* add link test and handling for file paths when flattening links for export
* add note about exporting file paths to readme.md | test/integration/static/next.config.js | @@ -9,7 +9,8 @@ module.exports = {
'/dynamic-imports': { page: '/dynamic-imports' },
'/dynamic': { page: '/dynamic', query: { text: 'cool dynamic text' } },
'/dynamic/one': { page: '/dynamic', query: { text: 'next export is nice' } },
- '/dynamic/two': { page: '/dynamic', query: { text: 'zeit ... | true |
Other | vercel | next.js | a79357f2a4bc8eca1bcc64ff30c411fee4842d98.json | Allow use of filenames in exportPathMap (#2973)
* allow use of filenames in exportPathMap
* add link test and handling for file paths when flattening links for export
* add note about exporting file paths to readme.md | test/integration/static/pages/index.js | @@ -44,6 +44,12 @@ export default () => (
>
<a id='with-hash'>With Hash</a>
</Link>
+ <Link
+ href='/dynamic?text=this+file+has+an+extension'
+ as='/file-name.md'
+ >
+ <a id='path-with-extension'>Path with extension</a>
+ </Link>
<Link href='/level1'>
... | true |
Other | vercel | next.js | a79357f2a4bc8eca1bcc64ff30c411fee4842d98.json | Allow use of filenames in exportPathMap (#2973)
* allow use of filenames in exportPathMap
* add link test and handling for file paths when flattening links for export
* add note about exporting file paths to readme.md | test/integration/static/test/ssr.js | @@ -1,5 +1,6 @@
/* global describe, it, expect */
import { renderViaHTTP } from 'next-test-utils'
+import cheerio from 'cheerio'
export default function (context) {
describe('Render via SSR', () => {
@@ -8,6 +9,15 @@ export default function (context) {
expect(html).toMatch(/This is the home page/)
}... | true |
Other | vercel | next.js | 285b27b3999ba54700df0ce93fd4ecd9f64c58bc.json | Add doc to onDemandEntries configuration (#3030) | readme.md | @@ -931,6 +931,21 @@ module.exports = {
}
```
+#### Configuring the onDemandEntries
+
+Next exposes some options that give you some control over how the server will dispose or keep in memories pages built:
+
+```js
+module.exports = {
+ onDemandEntries: {
+ // period (in ms) where the server will keep pages in ... | false |
Other | vercel | next.js | 97a6a62a6be874c4c6caa66cb6a0778011f8bfbd.json | Fix typo in README (#3038) | examples/with-asset-imports/README.md | @@ -24,7 +24,7 @@ now
## The idea behind the example
-This example shows how to enable the impors of assets (images, videos, etc.) and get a URL pointing to `/static`.
+This example shows how to enable the imports of assets (images, videos, etc.) and get a URL pointing to `/static`.
This is also configurable to... | false |
Other | vercel | next.js | 016920e3e03c2ac607fc508572af8d3af66125a9.json | Example: Improve ReasonML example (#3021)
* Git ignore with-reasonml/lib folder
The lib folder contains code generated by BuckleScript, it shouldn't be
versioned.
* Fix, case sensitive paths
Next.js use case-sensitive-paths-webpack-plugin and BuckleScript tries
to maintain the filename case.
* Refactor, ... | examples/with-reasonml/.babelrc | @@ -0,0 +1,8 @@
+{
+ "presets": [
+ "next/babel"
+ ],
+ "plugins": [
+ "babel-plugin-bucklescript"
+ ]
+} | true |
Other | vercel | next.js | 016920e3e03c2ac607fc508572af8d3af66125a9.json | Example: Improve ReasonML example (#3021)
* Git ignore with-reasonml/lib folder
The lib folder contains code generated by BuckleScript, it shouldn't be
versioned.
* Fix, case sensitive paths
Next.js use case-sensitive-paths-webpack-plugin and BuckleScript tries
to maintain the filename case.
* Refactor, ... | examples/with-reasonml/.gitignore | @@ -1,2 +1,3 @@
bs
.merlin
+lib/ | true |
Other | vercel | next.js | 016920e3e03c2ac607fc508572af8d3af66125a9.json | Example: Improve ReasonML example (#3021)
* Git ignore with-reasonml/lib folder
The lib folder contains code generated by BuckleScript, it shouldn't be
versioned.
* Fix, case sensitive paths
Next.js use case-sensitive-paths-webpack-plugin and BuckleScript tries
to maintain the filename case.
* Refactor, ... | examples/with-reasonml/README.md | @@ -14,6 +14,7 @@ Install it and run:
```bash
npm install
+npm run build
npm run dev
```
@@ -22,11 +23,21 @@ Deploy it to the cloud with [now](https://zeit.co/now) ([download](https://zeit.
```bash
now
```
+### Recommendation:
+
+Run BuckleScript build system `bsb -w` and `next -w` separately. For the sake
+... | true |
Other | vercel | next.js | 016920e3e03c2ac607fc508572af8d3af66125a9.json | Example: Improve ReasonML example (#3021)
* Git ignore with-reasonml/lib folder
The lib folder contains code generated by BuckleScript, it shouldn't be
versioned.
* Fix, case sensitive paths
Next.js use case-sensitive-paths-webpack-plugin and BuckleScript tries
to maintain the filename case.
* Refactor, ... | examples/with-reasonml/bsconfig.json | @@ -3,5 +3,8 @@
"sources": ["components", "pages"],
"bs-dependencies": ["reason-react"],
"reason": { "react-jsx": 2 },
- "package-specs": ["commonjs"]
+ "package-specs": ["commonjs"],
+ "bsc-flags": [
+ "-bs-super-errors"
+ ]
} | true |
Other | vercel | next.js | 016920e3e03c2ac607fc508572af8d3af66125a9.json | Example: Improve ReasonML example (#3021)
* Git ignore with-reasonml/lib folder
The lib folder contains code generated by BuckleScript, it shouldn't be
versioned.
* Fix, case sensitive paths
Next.js use case-sensitive-paths-webpack-plugin and BuckleScript tries
to maintain the filename case.
* Refactor, ... | examples/with-reasonml/components/Counter.re | @@ -1,14 +1,21 @@
-let component = ReasonReact.statefulComponent "Counter";
+type action =
+ | Add;
+
+let component = ReasonReact.reducerComponent "Counter";
+
let make _children => {
...component,
initialState: fun () => 0,
+ reducer: fun action state =>
+ switch action {
+ | Add => ReasonReact.Update ... | true |
Other | vercel | next.js | 016920e3e03c2ac607fc508572af8d3af66125a9.json | Example: Improve ReasonML example (#3021)
* Git ignore with-reasonml/lib folder
The lib folder contains code generated by BuckleScript, it shouldn't be
versioned.
* Fix, case sensitive paths
Next.js use case-sensitive-paths-webpack-plugin and BuckleScript tries
to maintain the filename case.
* Refactor, ... | examples/with-reasonml/lib/js/components/counter.js | @@ -1,31 +0,0 @@
-// Generated by BUCKLESCRIPT VERSION 1.8.1, PLEASE EDIT WITH CARE
-'use strict';
-
-var Block = require("bs-platform/lib/js/block.js");
-var Curry = require("bs-platform/lib/js/curry.js");
-var React = require("react");
-var Pervasives = require("bs-platform/lib/js/pervasives.js");
... | true |
Other | vercel | next.js | 016920e3e03c2ac607fc508572af8d3af66125a9.json | Example: Improve ReasonML example (#3021)
* Git ignore with-reasonml/lib folder
The lib folder contains code generated by BuckleScript, it shouldn't be
versioned.
* Fix, case sensitive paths
Next.js use case-sensitive-paths-webpack-plugin and BuckleScript tries
to maintain the filename case.
* Refactor, ... | examples/with-reasonml/lib/js/components/header.js | @@ -1,30 +0,0 @@
-// Generated by BUCKLESCRIPT VERSION 1.8.1, PLEASE EDIT WITH CARE
-'use strict';
-
-var React = require("react");
-var ReasonReact = require("reason-react/lib/js/src/reasonReact.js");
-
-var component = ReasonReact.statelessComponent("Header");
-
-var styles = {
- marginRight: "10px"
-};
-
-fun... | true |
Other | vercel | next.js | 016920e3e03c2ac607fc508572af8d3af66125a9.json | Example: Improve ReasonML example (#3021)
* Git ignore with-reasonml/lib folder
The lib folder contains code generated by BuckleScript, it shouldn't be
versioned.
* Fix, case sensitive paths
Next.js use case-sensitive-paths-webpack-plugin and BuckleScript tries
to maintain the filename case.
* Refactor, ... | examples/with-reasonml/lib/js/components/link.js | @@ -1,17 +0,0 @@
-// Generated by BUCKLESCRIPT VERSION 1.8.1, PLEASE EDIT WITH CARE
-'use strict';
-
-var Link = require("next/link");
-var Js_boolean = require("bs-platform/lib/js/js_boolean.js");
-var ReasonReact = require("reason-react/lib/js/src/reasonReact.js");
-
-function make(href, $staropt$star, childr... | true |
Other | vercel | next.js | 016920e3e03c2ac607fc508572af8d3af66125a9.json | Example: Improve ReasonML example (#3021)
* Git ignore with-reasonml/lib folder
The lib folder contains code generated by BuckleScript, it shouldn't be
versioned.
* Fix, case sensitive paths
Next.js use case-sensitive-paths-webpack-plugin and BuckleScript tries
to maintain the filename case.
* Refactor, ... | examples/with-reasonml/lib/js/pages/about.js | @@ -1,26 +0,0 @@
-// Generated by BUCKLESCRIPT VERSION 1.8.1, PLEASE EDIT WITH CARE
-'use strict';
-
-var React = require("react");
-var Header = require("../components/header.js");
-var Counter = require("../components/counter.js");
-var ReasonReact = require("reason-react/lib/js/src/reasonReact.js");
-... | true |
Other | vercel | next.js | 016920e3e03c2ac607fc508572af8d3af66125a9.json | Example: Improve ReasonML example (#3021)
* Git ignore with-reasonml/lib folder
The lib folder contains code generated by BuckleScript, it shouldn't be
versioned.
* Fix, case sensitive paths
Next.js use case-sensitive-paths-webpack-plugin and BuckleScript tries
to maintain the filename case.
* Refactor, ... | examples/with-reasonml/lib/js/pages/index.js | @@ -1,26 +0,0 @@
-// Generated by BUCKLESCRIPT VERSION 1.8.1, PLEASE EDIT WITH CARE
-'use strict';
-
-var React = require("react");
-var Header = require("../components/header.js");
-var Counter = require("../components/counter.js");
-var ReasonReact = require("reason-react/lib/js/src/reasonReact.js");
-... | true |
Other | vercel | next.js | 016920e3e03c2ac607fc508572af8d3af66125a9.json | Example: Improve ReasonML example (#3021)
* Git ignore with-reasonml/lib folder
The lib folder contains code generated by BuckleScript, it shouldn't be
versioned.
* Fix, case sensitive paths
Next.js use case-sensitive-paths-webpack-plugin and BuckleScript tries
to maintain the filename case.
* Refactor, ... | examples/with-reasonml/package.json | @@ -2,25 +2,18 @@
"name": "with-reasonml",
"version": "1.0.0",
"scripts": {
- "dev": "next -w",
- "build": "next build",
- "start": "next start -w"
+ "dev": "concurrently \"bsb --clean-world -make-world -w\" \"next -w\"",
+ "build": "bsb -clean-world -make-world && next build",
+ "start": "bs... | true |
Other | vercel | next.js | 016920e3e03c2ac607fc508572af8d3af66125a9.json | Example: Improve ReasonML example (#3021)
* Git ignore with-reasonml/lib folder
The lib folder contains code generated by BuckleScript, it shouldn't be
versioned.
* Fix, case sensitive paths
Next.js use case-sensitive-paths-webpack-plugin and BuckleScript tries
to maintain the filename case.
* Refactor, ... | examples/with-reasonml/pages/about.js | @@ -1,4 +1,4 @@
-import { jsComponent as About } from './about.re'
+import { jsComponent as About } from './About.re'
import React from 'react'
export default () => <About /> | true |
Other | vercel | next.js | 016920e3e03c2ac607fc508572af8d3af66125a9.json | Example: Improve ReasonML example (#3021)
* Git ignore with-reasonml/lib folder
The lib folder contains code generated by BuckleScript, it shouldn't be
versioned.
* Fix, case sensitive paths
Next.js use case-sensitive-paths-webpack-plugin and BuckleScript tries
to maintain the filename case.
* Refactor, ... | examples/with-reasonml/pages/index.js | @@ -1,3 +1,3 @@
-import { jsComponent as Index } from './index.re'
+import { jsComponent as Index } from './Index.re'
export default () => <Index /> | true |
Other | vercel | next.js | ee68d327fef53f791f8249fae5406829cd526f26.json | Use ReactDom.hydrate just for initial renderer. (#3012)
For other case just use ReactDom.render | client/index.js | @@ -123,9 +123,9 @@ export async function renderError (error) {
if (prod) {
const initProps = { err: error, pathname, query, asPath }
const props = await loadGetInitialProps(ErrorComponent, initProps)
- ReactDOM.hydrate(createElement(ErrorComponent, props), errorContainer)
+ renderReactElement(create... | false |
Other | vercel | next.js | 418cc210fab3a49820ac2781c184397a4c8a02f4.json | Add beta installation instruction | readme.md | @@ -56,8 +56,20 @@ Next.js is a minimalistic framework for server-rendered React applications.
Install it:
+#### Beta
+
+The beta has support for the latest version of React (v16) and is actively being developed upon.
+
+```bash
+npm install next@beta react react-dom
+```
+
+#### Stable
+
+This is the stable versi... | false |
Other | vercel | next.js | c6bd6ef9973b935df116eaafec1cd57555aa1b93.json | Treat navigation to empty hash as hash navigate (#2971)
# -> #foo and #foo -> # now operate in the same way. | lib/router/router.js | @@ -244,22 +244,19 @@ export default class Router {
onlyAHashChange (as) {
if (!this.asPath) return false
- const [ oldUrlNoHash ] = this.asPath.split('#')
+ const [ oldUrlNoHash, oldHash ] = this.asPath.split('#')
const [ newUrlNoHash, newHash ] = as.split('#')
// If the urls are change, th... | true |
Other | vercel | next.js | c6bd6ef9973b935df116eaafec1cd57555aa1b93.json | Treat navigation to empty hash as hash navigate (#2971)
# -> #foo and #foo -> # now operate in the same way. | test/integration/basic/pages/nav/hash-changes.js | @@ -21,6 +21,9 @@ export default class SelfReload extends Component {
<Link href='/nav/hash-changes'>
<a id='page-url'>Page URL</a>
</Link>
+ <Link href='#'>
+ <a id='via-empty-hash'>Via Empty Hash</a>
+ </Link>
<p>COUNT: {this.props.count}</p>
</div>
... | true |
Other | vercel | next.js | c6bd6ef9973b935df116eaafec1cd57555aa1b93.json | Treat navigation to empty hash as hash navigate (#2971)
# -> #foo and #foo -> # now operate in the same way. | test/integration/basic/test/client-navigation.js | @@ -188,6 +188,21 @@ export default (context, render) => {
})
})
+ describe('when hash set to empty', () => {
+ it('should not run getInitialProps', async () => {
+ const browser = await webdriver(context.appPort, '/nav/hash-changes')
+
+ const counter = await browser
+ ... | true |
Other | vercel | next.js | a50e440cf1d6381b41471fe6fbcf8f761cd38e21.json | Pass conf to export function (#2962)
* Pass conf to export function
* conf -> configuration | server/export.js | @@ -9,9 +9,9 @@ import { renderToHTML } from './render'
import { getAvailableChunks } from './utils'
import { printAndExit } from '../lib/utils'
-export default async function (dir, options) {
+export default async function (dir, options, configuration) {
dir = resolve(dir)
- const config = getConfig(dir)
+ co... | false |
Other | vercel | next.js | 2cfcc6bd5eeb5f2a0b3597100ff715d65abc8a73.json | Add "asPath" information to url objects (#2988) | lib/app.js | @@ -84,6 +84,7 @@ function createUrl (router) {
return {
query: router.query,
pathname: router.pathname,
+ asPath: router.asPath,
back: () => {
warn(`Warning: 'url.back()' is deprecated. Use "window.history.back()"`)
router.back() | false |
Other | vercel | next.js | ddd30787efbf699beb873f07df5333f01c58ba83.json | expose buildId to custom webpack configs (#3001)
* expose buildId to custom webpack configs
* update readme to include buildId in option object | readme.md | @@ -934,7 +934,7 @@ In order to extend our usage of `webpack`, you can define a function that extend
// (But you could use ES2015 features supported by your Node.js version)
module.exports = {
- webpack: (config, { dev }) => {
+ webpack: (config, { buildId, dev }) => {
// Perform customizations to webpack co... | true |
Other | vercel | next.js | ddd30787efbf699beb873f07df5333f01c58ba83.json | expose buildId to custom webpack configs (#3001)
* expose buildId to custom webpack configs
* update readme to include buildId in option object | server/build/webpack.js | @@ -335,7 +335,7 @@ export default async function createCompiler (dir, { buildId, dev = false, quiet
if (config.webpack) {
console.log(`> Using "webpack" config function defined in ${config.configOrigin}.`)
- webpackConfig = await config.webpack(webpackConfig, { dev })
+ webpackConfig = await config.web... | true |
Other | vercel | next.js | 094bb1f7b95f10c84a9e98d4ec76abfd03f8c60d.json | Add Cerebral example (#2976) | examples/with-cerebral/components/Clock.js | @@ -0,0 +1,24 @@
+export default (props) => {
+ return (
+ <div className={props.light ? 'light' : ''}>
+ {format(new Date(props.lastUpdate))}
+ <style jsx>{`
+ div {
+ padding: 15px;
+ color: #82FA58;
+ display: inline-block;
+ font: 50px menlo, monaco, monospac... | true |
Other | vercel | next.js | 094bb1f7b95f10c84a9e98d4ec76abfd03f8c60d.json | Add Cerebral example (#2976) | examples/with-cerebral/components/Page.js | @@ -0,0 +1,33 @@
+import React from 'react'
+import Link from 'next/link'
+import { connect } from '@cerebral/react'
+import { state, signal } from 'cerebral/tags'
+import Clock from './Clock'
+
+export default connect({
+ lastUpdate: state`clock.lastUpdate`,
+ light: state`clock.light`,
+ mounted: signal`clock.moun... | true |
Other | vercel | next.js | 094bb1f7b95f10c84a9e98d4ec76abfd03f8c60d.json | Add Cerebral example (#2976) | examples/with-cerebral/modules/clock/actions.js | @@ -0,0 +1,7 @@
+export function startTimer ({clock}) {
+ clock.start('clock.secondTicked')
+}
+
+export function stopTimer ({clock}) {
+ clock.stop()
+} | true |
Other | vercel | next.js | 094bb1f7b95f10c84a9e98d4ec76abfd03f8c60d.json | Add Cerebral example (#2976) | examples/with-cerebral/modules/clock/index.js | @@ -0,0 +1,16 @@
+
+import {mounted, unMounted, secondTicked} from './signals'
+import provider from './provider'
+
+export default {
+ state: {
+ lastUpdate: 0,
+ light: false
+ },
+ signals: {
+ mounted,
+ unMounted,
+ secondTicked
+ },
+ provider
+} | true |
Other | vercel | next.js | 094bb1f7b95f10c84a9e98d4ec76abfd03f8c60d.json | Add Cerebral example (#2976) | examples/with-cerebral/modules/clock/provider.js | @@ -0,0 +1,26 @@
+// milliseconds per second
+const SECOND = 1000
+let timer = null
+
+export default (context) => {
+ context.clock = {
+ start (signalPath) {
+ const signal = context.controller.getSignal(signalPath)
+
+ function tick () {
+ const now = Date.now()
+
+ signal({now})
+
+ ... | true |
Other | vercel | next.js | 094bb1f7b95f10c84a9e98d4ec76abfd03f8c60d.json | Add Cerebral example (#2976) | examples/with-cerebral/modules/clock/signals.js | @@ -0,0 +1,10 @@
+import {set} from 'cerebral/operators'
+import {state, props} from 'cerebral/tags'
+import {startTimer, stopTimer} from './actions'
+
+export const mounted = [
+ startTimer,
+ set(state`clock.light`, true)
+]
+export const unMounted = stopTimer
+export const secondTicked = set(state`clock.lastUpdate... | true |
Other | vercel | next.js | 094bb1f7b95f10c84a9e98d4ec76abfd03f8c60d.json | Add Cerebral example (#2976) | examples/with-cerebral/package.json | @@ -0,0 +1,18 @@
+{
+ "name": "with-cerebral",
+ "version": "1.0.0",
+ "description": "",
+ "main": "index.js",
+ "scripts": {
+ "dev": "next",
+ "build": "next build",
+ "start": "next start"
+ },
+ "author": "",
+ "license": "ISC",
+ "dependencies": {
+ "@cerebral/react": "^2.1.0",
+ "cerebral... | true |
Other | vercel | next.js | 094bb1f7b95f10c84a9e98d4ec76abfd03f8c60d.json | Add Cerebral example (#2976) | examples/with-cerebral/pages/index.js | @@ -0,0 +1,42 @@
+import React from 'react'
+import {Controller, UniversalController} from 'cerebral'
+import Devtools from 'cerebral/devtools'
+import { Container } from '@cerebral/react'
+import Page from '../components/Page'
+import clock from '../modules/clock'
+
+export default class Counter extends React.Componen... | true |
Other | vercel | next.js | 094bb1f7b95f10c84a9e98d4ec76abfd03f8c60d.json | Add Cerebral example (#2976) | examples/with-cerebral/pages/other.js | @@ -0,0 +1,42 @@
+import React from 'react'
+import {Controller, UniversalController} from 'cerebral'
+import Devtools from 'cerebral/devtools'
+import { Container } from '@cerebral/react'
+import Page from '../components/Page'
+import clock from '../modules/clock'
+
+export default class Counter extends React.Componen... | true |
Other | vercel | next.js | 4bd30c87136bffcd15e1c31fbd8fa110dfa5ea78.json | Example: Form handler with Redux and React-bootstrap (#2949)
* Example: Form handler with Redux and React-bootstrap
* inputChange refactoring
* Destructuring inputChange | examples/form-handler/README.md | @@ -0,0 +1,30 @@
+[](https://deploy.now.sh/?repo=https://github.com/zeit/next.js/tree/master/examples/form-handler)
+
+# Form Handler
+
+## How to use
+
+Download the example [or clone the repo](https://github.com/zeit/next.js):
+
+```bash
+curl https://codeload.... | true |
Other | vercel | next.js | 4bd30c87136bffcd15e1c31fbd8fa110dfa5ea78.json | Example: Form handler with Redux and React-bootstrap (#2949)
* Example: Form handler with Redux and React-bootstrap
* inputChange refactoring
* Destructuring inputChange | examples/form-handler/actions/formActionsCreators.js | @@ -0,0 +1,5 @@
+import { INPUT_VALUE } from '../constants'
+
+export const inputChange = (title, name, val) => dispatch => {
+ return dispatch({type: INPUT_VALUE, title, name, val})
+} | true |
Other | vercel | next.js | 4bd30c87136bffcd15e1c31fbd8fa110dfa5ea78.json | Example: Form handler with Redux and React-bootstrap (#2949)
* Example: Form handler with Redux and React-bootstrap
* inputChange refactoring
* Destructuring inputChange | examples/form-handler/actions/index.js | @@ -0,0 +1 @@
+export * from './formActionsCreators' | true |
Other | vercel | next.js | 4bd30c87136bffcd15e1c31fbd8fa110dfa5ea78.json | Example: Form handler with Redux and React-bootstrap (#2949)
* Example: Form handler with Redux and React-bootstrap
* inputChange refactoring
* Destructuring inputChange | examples/form-handler/components/DisplayForm.js | @@ -0,0 +1,26 @@
+import React, {Component} from 'react'
+import { Col, Row } from 'react-bootstrap'
+import { connect } from 'react-redux'
+
+class DisplayForm extends Component {
+ render () {
+ const { state } = this.props
+ return (
+ <div>
+ <Row>
+ <Col lg={8} lgOffset={2}>
+ ... | true |
Other | vercel | next.js | 4bd30c87136bffcd15e1c31fbd8fa110dfa5ea78.json | Example: Form handler with Redux and React-bootstrap (#2949)
* Example: Form handler with Redux and React-bootstrap
* inputChange refactoring
* Destructuring inputChange | examples/form-handler/components/Header.js | @@ -0,0 +1,17 @@
+import { Col, Row, Jumbotron } from 'react-bootstrap'
+
+const Header = () => {
+ return (
+ <div>
+ <Row style={{ marginTop: '10px' }}>
+ <Col lg={8} lgOffset={2}>
+ <Jumbotron style={{ borderRadius: '15px' }}>
+ <h1 style={{textAlign: 'center'}}>Form Handler</h1>
... | true |
Other | vercel | next.js | 4bd30c87136bffcd15e1c31fbd8fa110dfa5ea78.json | Example: Form handler with Redux and React-bootstrap (#2949)
* Example: Form handler with Redux and React-bootstrap
* inputChange refactoring
* Destructuring inputChange | examples/form-handler/components/Social.js | @@ -0,0 +1,26 @@
+import { Col, Row } from 'react-bootstrap'
+
+import Input from '../handlers/Input'
+
+const Social = () => {
+ return (
+ <div>
+ <Row>
+ <Col lg={8}>
+ <Input controlLabel='Facebook' title='social' name='facebook' />
+ </Col>
+ <Col lg={8}>
+ <Input co... | true |
Other | vercel | next.js | 4bd30c87136bffcd15e1c31fbd8fa110dfa5ea78.json | Example: Form handler with Redux and React-bootstrap (#2949)
* Example: Form handler with Redux and React-bootstrap
* inputChange refactoring
* Destructuring inputChange | examples/form-handler/components/UserForm.js | @@ -0,0 +1,26 @@
+import { Col, Row } from 'react-bootstrap'
+
+import Input from '../handlers/Input'
+
+const UserForm = () => {
+ return (
+ <div>
+ <Row>
+ <Col lg={8} lgOffset={4}>
+ <Input controlLabel='Name' title='user' name='name' />
+ </Col>
+ <Col lg={8} lgOffset={4}>
+ ... | true |
Other | vercel | next.js | 4bd30c87136bffcd15e1c31fbd8fa110dfa5ea78.json | Example: Form handler with Redux and React-bootstrap (#2949)
* Example: Form handler with Redux and React-bootstrap
* inputChange refactoring
* Destructuring inputChange | examples/form-handler/components/index.js | @@ -0,0 +1,34 @@
+import React, {Component} from 'react'
+import Head from 'next/head'
+import { Col, Row } from 'react-bootstrap'
+
+import Header from './Header'
+import DisplayForm from './DisplayForm'
+
+import UserForm from './UserForm'
+import Social from './Social'
+
+class Main extends Component {
+ render () ... | true |
Other | vercel | next.js | 4bd30c87136bffcd15e1c31fbd8fa110dfa5ea78.json | Example: Form handler with Redux and React-bootstrap (#2949)
* Example: Form handler with Redux and React-bootstrap
* inputChange refactoring
* Destructuring inputChange | examples/form-handler/constants/index.js | @@ -0,0 +1 @@
+export const INPUT_VALUE = 'INPUT_VALUE' | true |
Other | vercel | next.js | 4bd30c87136bffcd15e1c31fbd8fa110dfa5ea78.json | Example: Form handler with Redux and React-bootstrap (#2949)
* Example: Form handler with Redux and React-bootstrap
* inputChange refactoring
* Destructuring inputChange | examples/form-handler/handlers/Input.js | @@ -0,0 +1,38 @@
+import React, {Component} from 'react'
+import { FormGroup, ControlLabel, FormControl } from 'react-bootstrap'
+import { connect } from 'react-redux'
+import { bindActionCreators } from 'redux'
+
+import { inputChange } from '../actions'
+
+class Input extends Component {
+ inputChange = (e) => {
+ ... | true |
Other | vercel | next.js | 4bd30c87136bffcd15e1c31fbd8fa110dfa5ea78.json | Example: Form handler with Redux and React-bootstrap (#2949)
* Example: Form handler with Redux and React-bootstrap
* inputChange refactoring
* Destructuring inputChange | examples/form-handler/package.json | @@ -0,0 +1,26 @@
+{
+ "name": "redux-form",
+ "version": "1.0.0",
+ "description": "",
+ "main": "index.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1",
+ "start": "next start -p 8000",
+ "dev": "node server.js",
+ "build": "next build"
+ },
+ "keywords": [],
+ "author": ... | true |
Other | vercel | next.js | 4bd30c87136bffcd15e1c31fbd8fa110dfa5ea78.json | Example: Form handler with Redux and React-bootstrap (#2949)
* Example: Form handler with Redux and React-bootstrap
* inputChange refactoring
* Destructuring inputChange | examples/form-handler/pages/index.js | @@ -0,0 +1,14 @@
+import React, { Component } from 'react'
+import withRedux from 'next-redux-wrapper'
+
+import Main from '../components'
+
+import { initStore } from '../store'
+
+class Index extends Component {
+ render () {
+ return <Main />
+ }
+}
+
+export default withRedux(initStore, null)(Index) | true |
Other | vercel | next.js | 4bd30c87136bffcd15e1c31fbd8fa110dfa5ea78.json | Example: Form handler with Redux and React-bootstrap (#2949)
* Example: Form handler with Redux and React-bootstrap
* inputChange refactoring
* Destructuring inputChange | examples/form-handler/reducers/formReducer.js | @@ -0,0 +1,15 @@
+import { INPUT_VALUE } from '../constants'
+
+export default (state = {}, action) => {
+ switch (action.type) {
+ case INPUT_VALUE:
+ return { ...state,
+ [action.title]:
+ { ...state[action.title],
+ [action.name]: action.val
+ }
+ }
+ default:
+ re... | true |
Other | vercel | next.js | 4bd30c87136bffcd15e1c31fbd8fa110dfa5ea78.json | Example: Form handler with Redux and React-bootstrap (#2949)
* Example: Form handler with Redux and React-bootstrap
* inputChange refactoring
* Destructuring inputChange | examples/form-handler/reducers/index.js | @@ -0,0 +1,6 @@
+import { combineReducers } from 'redux'
+import formReducer from './formReducer'
+
+export default combineReducers({
+ formReducer
+}) | true |
Other | vercel | next.js | 4bd30c87136bffcd15e1c31fbd8fa110dfa5ea78.json | Example: Form handler with Redux and React-bootstrap (#2949)
* Example: Form handler with Redux and React-bootstrap
* inputChange refactoring
* Destructuring inputChange | examples/form-handler/server.js | @@ -0,0 +1,28 @@
+const express = require('express')
+const next = require('next')
+
+const dev = process.env.NODE_ENV !== 'production'
+const app = next({ dev })
+const handle = app.getRequestHandler()
+
+app.prepare()
+.then(() => {
+ const server = express()
+
+ server.get('/', (req, res) => {
+ return handle(r... | true |
Other | vercel | next.js | 4bd30c87136bffcd15e1c31fbd8fa110dfa5ea78.json | Example: Form handler with Redux and React-bootstrap (#2949)
* Example: Form handler with Redux and React-bootstrap
* inputChange refactoring
* Destructuring inputChange | examples/form-handler/store.js | @@ -0,0 +1,7 @@
+import { createStore, applyMiddleware } from 'redux'
+import thunkMiddleware from 'redux-thunk'
+import reducer from './reducers'
+
+export const initStore = (initialState = {}) => {
+ return createStore(reducer, initialState, applyMiddleware(thunkMiddleware))
+} | true |
Other | vercel | next.js | 5a305265d9b8bcec876b1e817699f08f1d5a7c23.json | Fix description by renaming '.next' to 'out' (#2938) | bin/next-export | @@ -29,8 +29,7 @@ if (argv.help) {
$ next export [options] <dir>
<dir> represents where the compiled dist folder should go.
- If no directory is provided, the dist folder will be created in the current directory.
- You can set a custom folder in config https://github.com/zeit/next.js#custom-configur... | false |
Other | vercel | next.js | 27f517d27d1d261eb7209e244536c5b7659ee1cc.json | Fix error messages in server/export.js (#2933) | server/export.js | @@ -63,8 +63,8 @@ export default async function (dir, options) {
// Get the exportPathMap from the `next.config.js`
if (typeof config.exportPathMap !== 'function') {
printAndExit(
- '> Could not found "exportPathMap" function inside "next.config.js"\n' +
- '> "next export" uses that function build ... | false |
Other | vercel | next.js | c0d031d90ec14535fbbe0ba56b8a27740849ec59.json | Fix coding style of snippets (#2806) | readme.md | @@ -77,9 +77,7 @@ After that, the file-system is the main API. Every `.js` file becomes a route th
Populate `./pages/index.js` inside your project:
```jsx
-export default () => (
- <div>Welcome to next.js!</div>
-)
+export default () => <div>Welcome to next.js!</div>
```
and then just run `npm run dev` and go ... | false |
Other | vercel | next.js | 6e8878041958373b4d5db25c4206d82a59d7af24.json | Add missing variables (#2905) | examples/with-external-scoped-css/pages/_document.js | @@ -3,8 +3,8 @@ import Document, { Head, Main, NextScript } from 'next/document'
export default class MyDocument extends Document {
static getInitialProps ({ renderPage }) {
- const {html, head} = renderPage()
- return { html, head }
+ const { html, head, errorHtml, chunks } = renderPage()
+ return { ... | false |
Other | vercel | next.js | 32c3dd047612cd9eda044e100e36ca85117ca517.json | docs(jest): add note about .babelrc (#2911)
Closes #2895 | examples/with-jest/README.md | @@ -22,3 +22,5 @@ npm test
This example features:
* An app with jest tests
+
+> A very important part of this example is the `.babelrc` file which configures the `test` environment to use `babel-preset-env` and configures it to transpile modules to `commonjs`). [Learn more](https://github.com/zeit/next.js/issues/28... | false |
Other | vercel | next.js | d2276179bea211fa9ad9b77b46df26271f53c768.json | Describe solution to centralized routing (#2844)
* Add section for Centralized Routing
* Update title of section
* Update formatting
* Remove solution from README and link to it from FAQ | readme.md | @@ -1016,7 +1016,6 @@ So, you could only use `pathname`, `query` and `asPath` fields of the `context`
> Basically, you won't be able to render HTML content dynamically as we pre-build HTML files. If you need that, you need run your app with `next start`.
-
## Recipes
- [Setting up 301 redirects](https://www.ra... | false |
Other | vercel | next.js | b543795fc04264c326001dd523cc6edd7cb116bf.json | Clarify usage of `connect` in README.md (#2845)
Added a quick example of how to use `connect` in `react-redux` as there are no examples in this example. | examples/with-apollo-and-redux/README.md | @@ -24,4 +24,17 @@ now
```
## The idea behind the example
-By default, Apollo Client creates its own internal Redux store to manage queries and their results. If you are already using Redux for the rest of your app, [you can have the client integrate with your existing store instead](http://dev.apollodata.com/react... | false |
Other | vercel | next.js | 3c92524b06a73f4252e52f28dbbd4fd2c6e3fe3d.json | Update example with emotion (#2837)
* Update example with emotion
Emotion is now split into separate packages using Lerna.
* Update Next.js in emotion example | examples/with-emotion/.babelrc | @@ -3,6 +3,6 @@
"next/babel"
],
"plugins": [
- ["emotion/babel", { "inline": true }]
+ ["emotion", { "inline": true }]
]
}
\ No newline at end of file | true |
Other | vercel | next.js | 3c92524b06a73f4252e52f28dbbd4fd2c6e3fe3d.json | Update example with emotion (#2837)
* Update example with emotion
Emotion is now split into separate packages using Lerna.
* Update Next.js in emotion example | examples/with-emotion/package.json | @@ -7,10 +7,13 @@
"start": "next start"
},
"dependencies": {
- "emotion": "^5.1.4",
- "next": "^2.4.6",
+ "babel-plugin-emotion": "^7.1.0",
+ "emotion": "^7.2.0",
+ "emotion-server": "^7.2.0",
+ "next": "^3.0.6",
"react": "^15.6.1",
- "react-dom": "^15.6.1"
+ "react-dom": "^15.6.... | true |
Other | vercel | next.js | 3c92524b06a73f4252e52f28dbbd4fd2c6e3fe3d.json | Update example with emotion (#2837)
* Update example with emotion
Emotion is now split into separate packages using Lerna.
* Update Next.js in emotion example | examples/with-emotion/pages/_document.js | @@ -1,5 +1,5 @@
import Document, { Head, Main, NextScript } from 'next/document'
-import { extractCritical } from 'emotion/server'
+import { extractCritical } from 'emotion-server'
import { flush } from 'emotion'
const dev = process.env.NODE_ENV !== 'production' | true |
Other | vercel | next.js | 3c92524b06a73f4252e52f28dbbd4fd2c6e3fe3d.json | Update example with emotion (#2837)
* Update example with emotion
Emotion is now split into separate packages using Lerna.
* Update Next.js in emotion example | examples/with-emotion/pages/index.js | @@ -1,6 +1,6 @@
import React from 'react'
import { hydrate, keyframes, css, injectGlobal } from 'emotion'
-import styled from 'emotion/react'
+import styled from 'react-emotion'
// Adds server generated styles to emotion cache.
// '__NEXT_DATA__.ids' is set in '_document.js' | true |
Other | vercel | next.js | 9c18c548bb547485c7358d86881cb8add5f2bcdb.json | Pass an HOC to renderPage() (#2010)
* Added passing an HOC to renderPage()
* Remove gitignore | server/render.js | @@ -66,9 +66,9 @@ async function doRender (req, res, pathname, query, {
// the response might be finshed on the getinitialprops call
if (res.finished) return
- const renderPage = () => {
+ const renderPage = (enhancer = Page => Page) => {
const app = createElement(App, {
- Component,
+ Componen... | false |
Other | vercel | next.js | c689bc9f8bb555a844eada2c279b4616ba804196.json | Simplify condition in mobx example (#2812) | examples/with-mobx/store.js | @@ -21,7 +21,7 @@ class Store {
}
export function initStore (isServer, lastUpdate = Date.now()) {
- if (isServer && typeof window === 'undefined') {
+ if (isServer) {
return new Store(isServer, lastUpdate)
} else {
if (store === null) { | false |
Other | vercel | next.js | 232ba01f840d5582ff5f0d98dcf3a23a7705206e.json | docs(material-ui): move the source code to Material-UI repository (#2808) | examples/with-material-ui-next/README.md | @@ -1,13 +1,13 @@
-[](https://deploy.now.sh/?repo=https://github.com/zeit/next.js/tree/master/examples/with-material-ui-next)
+[](https://deploy.now.sh/?repo=https://github.com/callemall/material-ui/tree/v1... | true |
Other | vercel | next.js | 232ba01f840d5582ff5f0d98dcf3a23a7705206e.json | docs(material-ui): move the source code to Material-UI repository (#2808) | examples/with-material-ui-next/components/withRoot.js | @@ -1,62 +0,0 @@
-import React, { Component } from 'react'
-import { JssProvider } from 'react-jss'
-import { withStyles, MuiThemeProvider } from 'material-ui/styles'
-import { getContext } from '../styles/context'
-
-// Apply some reset
-const styleSheet = theme => ({
- '@global': {
- html: {
- background: th... | true |
Other | vercel | next.js | 232ba01f840d5582ff5f0d98dcf3a23a7705206e.json | docs(material-ui): move the source code to Material-UI repository (#2808) | examples/with-material-ui-next/package.json | @@ -1,16 +0,0 @@
-{
- "name": "with-material-ui-next",
- "version": "1.0.0",
- "dependencies": {
- "material-ui": "next",
- "next": "latest",
- "react": "^15.5.4",
- "react-dom": "^15.5.4",
- "react-jss": "^7.0.2"
- },
- "scripts": {
- "dev": "next",
- "build": "next build",
- "start": "nex... | true |
Other | vercel | next.js | 232ba01f840d5582ff5f0d98dcf3a23a7705206e.json | docs(material-ui): move the source code to Material-UI repository (#2808) | examples/with-material-ui-next/pages/_document.js | @@ -1,47 +0,0 @@
-import React from 'react'
-import Document, { Head, Main, NextScript } from 'next/document'
-import { getContext, setContext } from '../styles/context'
-
-export default class MyDocument extends Document {
- static async getInitialProps (ctx) {
- // Reset the context for handling a new request.
- ... | true |
Other | vercel | next.js | 232ba01f840d5582ff5f0d98dcf3a23a7705206e.json | docs(material-ui): move the source code to Material-UI repository (#2808) | examples/with-material-ui-next/pages/index.js | @@ -1,58 +0,0 @@
-import React, {Component} from 'react'
-import Button from 'material-ui/Button'
-import Dialog, {
- DialogTitle,
- DialogContent,
- DialogContentText,
- DialogActions
-} from 'material-ui/Dialog'
-import Typography from 'material-ui/Typography'
-import withRoot from '../components/withRoot'
-
-con... | true |
Other | vercel | next.js | 232ba01f840d5582ff5f0d98dcf3a23a7705206e.json | docs(material-ui): move the source code to Material-UI repository (#2808) | examples/with-material-ui-next/styles/context.js | @@ -1,49 +0,0 @@
-import { create } from 'jss'
-import preset from 'jss-preset-default'
-import { SheetsRegistry } from 'react-jss'
-import createPalette from 'material-ui/styles/palette'
-import createMuiTheme from 'material-ui/styles/theme'
-import { purple, green } from 'material-ui/colors'
-import createGenerateCla... | true |
Other | vercel | next.js | c826048ad0d66f5de647ebdc287cf5c8a02a2e2a.json | Improve contributing guide (#7186)
- Correct the path to the compiled Next binary
- Code to reveal which pages are avaliable within an example
- Preferred way of testing an external application with a locally compiled Next
- Add markdown code annotations | contributing.md | @@ -3,52 +3,90 @@
Our Commitment to Open Source can be found [here](https://zeit.co/blog/oss)
1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device.
-1. Install yarn: `npm i... | false |
Other | vercel | next.js | 2eee87663057b98f73c21944b15012803286b4a5.json | Add types for getInitialProps (#7162)
* Added types for pages | packages/next-server/lib/utils.ts | @@ -8,8 +8,8 @@ import { BaseRouter } from './router/router'
/**
* Types used by both next and next-server
*/
-export type NextComponentType<C extends BaseContext = any, P = any, CP = {}> = ComponentType<CP> & {
- getInitialProps?(context: C): Promise<P>,
+export type NextComponentType<C extends BaseContext = ICo... | true |
Other | vercel | next.js | 2eee87663057b98f73c21944b15012803286b4a5.json | Add types for getInitialProps (#7162)
* Added types for pages | packages/next/types/index.d.ts | @@ -1,4 +1,5 @@
import React from 'react'
+import { IContext } from 'next-server/dist/lib/utils';
// Extend the React types with missing properties
declare module 'react' {
@@ -18,3 +19,12 @@ declare module 'react' {
global?: boolean;
}
}
+
+export type NextPageContext = IContext
+
+export type NextPage<P... | true |
Other | vercel | next.js | 00e8ba49819274564249cb55950841b3555d5929.json | Update Prettier configuration | .prettierrc.json | @@ -1,4 +1,5 @@
{
"singleQuote": true,
- "semi": false
+ "semi": false,
+ "trailingComma": "es5"
} | false |
Other | vercel | next.js | a008b199324a4c7b7aa1372e3e7991f5f930c18b.json | Reduce CircleCI Parallelism (#7171) | .circleci/config.yml | @@ -103,7 +103,7 @@ jobs:
- yarn_lint
- *persist_to_workspace
test:
- parallelism: 4
+ parallelism: 3
executor: node
steps:
- *attach_workspace | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.