├── .circleci
└── config.yml
├── .github
├── ISSUE_TEMPLATE
│ ├── 1.Bug_report.md
│ ├── 2.Feature_request.md
│ ├── 3.Example_Bug_report.md
│ ├── 8.Question_about_next.md
│ └── 9.Nextjs.org_showcase.md
└── lock.yml
├── .gitignore
├── .npmrc
├── .travis.yml
├── azure-pipelines.yml
├── bench
├── package.json
├── pages
│ ├── stateless-big.js
│ └── stateless.js
└── readme.md
├── contributing.md
├── errors
├── build-dir-not-writeable.md
├── generatebuildid-not-a-string.md
├── get-initial-props-as-an-instance-method.md
├── no-document-title.md
├── no-on-app-updated-hook.md
├── popstate-state-empty.md
└── url-deprecated.md
├── examples
├── active-class-name
│ ├── README.md
│ ├── components
│ │ ├── Link.js
│ │ └── Nav.js
│ ├── package.json
│ └── pages
│ │ ├── about.js
│ │ └── index.js
├── analyze-bundles
│ ├── README.md
│ ├── next.config.js
│ ├── package.json
│ └── pages
│ │ ├── about.js
│ │ ├── contact.js
│ │ └── index.js
├── basic-css
│ ├── README.md
│ ├── package.json
│ └── pages
│ │ └── index.js
├── basic-export
│ ├── .gitignore
│ ├── README.md
│ ├── package.json
│ └── pages
│ │ ├── about.js
│ │ ├── about2.js
│ │ ├── day
│ │ └── index.js
│ │ └── index.js
├── custom-charset
│ ├── README.md
│ ├── package.json
│ ├── pages
│ │ └── index.js
│ └── server.js
├── custom-server-actionhero
│ ├── README.md
│ ├── actions
│ │ └── render.js
│ ├── config
│ │ ├── api.js
│ │ ├── errors.js
│ │ ├── i18n.js
│ │ ├── logger.js
│ │ ├── plugins.js
│ │ ├── redis.js
│ │ ├── routes.js
│ │ ├── servers
│ │ │ ├── socket.js
│ │ │ ├── web.js
│ │ │ └── websocket.js
│ │ └── tasks.js
│ ├── dump.rdb
│ ├── initializers
│ │ └── next.js
│ ├── locales
│ │ └── en.json
│ ├── package.json
│ └── pages
│ │ ├── a.js
│ │ ├── b.js
│ │ └── index.js
├── custom-server-express
│ ├── README.md
│ ├── package.json
│ ├── pages
│ │ ├── a.js
│ │ ├── b.js
│ │ ├── index.js
│ │ └── posts.js
│ └── server.js
├── custom-server-fastify
│ ├── README.md
│ ├── package.json
│ ├── pages
│ │ ├── a.js
│ │ ├── b.js
│ │ └── index.js
│ └── server.js
├── custom-server-hapi
│ ├── README.md
│ ├── next-wrapper.js
│ ├── package.json
│ ├── pages
│ │ ├── a.js
│ │ ├── b.js
│ │ └── index.js
│ └── server.js
├── custom-server-koa
│ ├── README.md
│ ├── package.json
│ ├── pages
│ │ ├── a.js
│ │ ├── b.js
│ │ └── index.js
│ └── server.js
├── custom-server-micro
│ ├── README.md
│ ├── package.json
│ ├── pages
│ │ ├── a.js
│ │ ├── b.js
│ │ └── index.js
│ └── server.js
├── custom-server-nodemon
│ ├── README.md
│ ├── nodemon.json
│ ├── package.json
│ ├── pages
│ │ ├── a.js
│ │ ├── b.js
│ │ └── index.js
│ └── server
│ │ └── index.js
├── custom-server-polka
│ ├── README.md
│ ├── package.json
│ ├── pages
│ │ ├── a.js
│ │ ├── b.js
│ │ └── index.js
│ └── server.js
├── custom-server-typescript
│ ├── .babelrc
│ ├── README.md
│ ├── next.config.js
│ ├── nodemon.json
│ ├── package.json
│ ├── pages
│ │ ├── a.tsx
│ │ ├── b.tsx
│ │ └── index.tsx
│ ├── server
│ │ └── index.ts
│ ├── tsconfig.json
│ └── tsconfig.server.json
├── custom-server
│ ├── README.md
│ ├── package.json
│ ├── pages
│ │ ├── a.js
│ │ ├── b.js
│ │ └── index.js
│ └── server.js
├── data-fetch
│ ├── README.md
│ ├── package.json
│ └── pages
│ │ ├── index.js
│ │ └── preact.js
├── form-handler
│ ├── README.md
│ ├── actions
│ │ ├── formActionsCreators.js
│ │ └── index.js
│ ├── components
│ │ ├── DisplayForm.js
│ │ ├── Header.js
│ │ ├── Social.js
│ │ ├── UserForm.js
│ │ └── index.js
│ ├── constants
│ │ └── index.js
│ ├── handlers
│ │ └── Input.js
│ ├── package.json
│ ├── pages
│ │ └── index.js
│ ├── reducers
│ │ ├── formReducer.js
│ │ └── index.js
│ ├── server.js
│ └── store.js
├── gh-pages
│ ├── .babelrc.js
│ ├── .gitignore
│ ├── README.md
│ ├── env-config.js
│ ├── next.config.js
│ ├── package.json
│ └── pages
│ │ ├── about.js
│ │ └── index.js
├── head-elements
│ ├── README.md
│ ├── package.json
│ └── pages
│ │ └── index.js
├── hello-world
│ ├── README.md
│ ├── package.json
│ └── pages
│ │ ├── about.js
│ │ ├── day
│ │ └── index.js
│ │ └── index.js
├── layout-component
│ ├── README.md
│ ├── components
│ │ └── layout.js
│ ├── package.json
│ └── pages
│ │ ├── about.js
│ │ ├── contact.js
│ │ └── index.js
├── nested-components
│ ├── README.md
│ ├── components
│ │ ├── paragraph.js
│ │ └── post.js
│ ├── package.json
│ └── pages
│ │ └── index.js
├── only-client-render-external-dependencies
│ ├── README.md
│ ├── components
│ │ ├── BarChart.js
│ │ └── LineChart.js
│ ├── package.json
│ └── pages
│ │ ├── chart.js
│ │ └── index.js
├── page-transitions
│ └── README.md
├── parameterized-routing
│ ├── README.md
│ ├── package.json
│ ├── pages
│ │ ├── blog.js
│ │ └── index.js
│ └── server.js
├── pass-server-data
│ ├── README.md
│ ├── data
│ │ └── item.json
│ ├── operations
│ │ └── get-item.js
│ ├── package.json
│ ├── pages
│ │ ├── index.js
│ │ └── item.js
│ └── server.js
├── progressive-render
│ ├── README.md
│ ├── components
│ │ └── Loading.js
│ ├── package.json
│ └── pages
│ │ └── index.js
├── root-static-files
│ ├── README.md
│ ├── package.json
│ ├── pages
│ │ └── index.js
│ ├── server.js
│ └── static
│ │ ├── favicon.ico
│ │ ├── robots.txt
│ │ └── sitemap.xml
├── shared-modules
│ ├── README.md
│ ├── components
│ │ ├── Counter.js
│ │ └── Header.js
│ ├── package.json
│ └── pages
│ │ ├── about.js
│ │ └── index.js
├── ssr-caching
│ ├── README.md
│ ├── package.json
│ ├── pages
│ │ ├── blog.js
│ │ └── index.js
│ └── server.js
├── svg-components
│ ├── .babelrc
│ ├── README.md
│ ├── package.json
│ ├── pages
│ │ └── index.js
│ └── svgs
│ │ └── cat.svg
├── using-inferno
│ ├── README.md
│ ├── next.config.js
│ ├── package.json
│ ├── pages
│ │ ├── about.js
│ │ └── index.js
│ └── server.js
├── using-nerv
│ ├── README.md
│ ├── next.config.js
│ ├── package.json
│ ├── pages
│ │ ├── about.js
│ │ └── index.js
│ └── server.js
├── using-preact
│ ├── README.md
│ ├── next.config.js
│ ├── package.json
│ ├── pages
│ │ ├── about.js
│ │ └── index.js
│ └── server.js
├── using-router
│ ├── README.md
│ ├── components
│ │ └── Header.js
│ ├── package.json
│ └── pages
│ │ ├── about.js
│ │ ├── error.js
│ │ └── index.js
├── using-with-router
│ ├── README.md
│ ├── components
│ │ ├── ActiveLink.js
│ │ └── Header.js
│ ├── package.json
│ └── pages
│ │ ├── about.js
│ │ ├── error.js
│ │ └── index.js
├── with-absolute-imports
│ ├── README.md
│ ├── components
│ │ └── header.js
│ ├── next.config.js
│ ├── package.json
│ └── pages
│ │ └── index.js
├── with-algolia-react-instantsearch
│ ├── .gitignore
│ ├── README.md
│ ├── components
│ │ ├── app.js
│ │ ├── head.js
│ │ ├── index.js
│ │ └── instantsearch.js
│ ├── next.config.js
│ ├── package.json
│ ├── pages
│ │ └── index.js
│ └── static
│ │ ├── favicon.ico
│ │ └── instantsearch.css
├── with-amp
│ ├── README.md
│ ├── components
│ │ └── Byline.js
│ ├── package.json
│ ├── pages
│ │ ├── _document.js
│ │ ├── dog.js
│ │ └── index.js
│ └── static
│ │ ├── cat.jpg
│ │ └── dog.jpg
├── with-ant-design-less
│ ├── .babelrc
│ ├── README.md
│ ├── assets
│ │ └── antd-custom.less
│ ├── next.config.js
│ ├── package.json
│ └── pages
│ │ └── index.js
├── with-ant-design
│ ├── .babelrc
│ ├── README.md
│ ├── next.config.js
│ ├── package.json
│ └── pages
│ │ ├── _document.js
│ │ └── index.js
├── with-antd-mobile
│ ├── .babelrc
│ ├── README.md
│ ├── components
│ │ └── Layout.js
│ ├── next.config.js
│ ├── package.json
│ └── pages
│ │ ├── _app.js
│ │ ├── about.js
│ │ └── index.js
├── with-aphrodite
│ ├── README.md
│ ├── package.json
│ └── pages
│ │ ├── _document.js
│ │ └── index.js
├── with-apollo-and-redux-saga
│ ├── README.md
│ ├── components
│ │ ├── App.js
│ │ ├── Clock.js
│ │ ├── ErrorMessage.js
│ │ ├── Header.js
│ │ ├── Page.js
│ │ ├── PageCount.js
│ │ ├── Placeholder.js
│ │ ├── Post.js
│ │ ├── PostList.js
│ │ ├── PostVoteButton.js
│ │ ├── PostVoteCount.js
│ │ ├── PostVoteDown.js
│ │ ├── PostVoteUp.js
│ │ └── Submit.js
│ ├── lib
│ │ ├── clock
│ │ │ ├── actions.js
│ │ │ ├── reducers.js
│ │ │ └── sagas.js
│ │ ├── count
│ │ │ ├── actions.js
│ │ │ └── reducers.js
│ │ ├── initApollo.js
│ │ ├── placeholder
│ │ │ ├── actions.js
│ │ │ ├── reducers.js
│ │ │ └── sagas.js
│ │ ├── rootReducer.js
│ │ ├── rootSaga.js
│ │ ├── withApollo.js
│ │ └── withReduxSaga.js
│ ├── package.json
│ ├── pages
│ │ ├── about.js
│ │ ├── blog
│ │ │ ├── entry.js
│ │ │ └── index.js
│ │ └── index.js
│ ├── routes.js
│ └── server.js
├── with-apollo-and-redux
│ ├── README.md
│ ├── components
│ │ ├── AddCount.js
│ │ ├── App.js
│ │ ├── Clock.js
│ │ ├── ErrorMessage.js
│ │ ├── Header.js
│ │ ├── Page.js
│ │ ├── PostList.js
│ │ ├── PostUpvoter.js
│ │ └── Submit.js
│ ├── lib
│ │ ├── initApollo.js
│ │ ├── store.js
│ │ └── withApollo.js
│ ├── package.json
│ └── pages
│ │ ├── apollo.js
│ │ ├── index.js
│ │ └── redux.js
├── with-apollo-auth
│ ├── README.md
│ ├── components
│ │ ├── RegisterBox.js
│ │ └── SigninBox.js
│ ├── lib
│ │ ├── checkLoggedIn.js
│ │ ├── initApollo.js
│ │ ├── redirect.js
│ │ └── withApollo.js
│ ├── package.json
│ ├── pages
│ │ ├── _app.js
│ │ ├── create-account.js
│ │ ├── index.js
│ │ └── signin.js
│ └── project.graphcool
├── with-apollo
│ ├── README.md
│ ├── components
│ │ ├── App.js
│ │ ├── ErrorMessage.js
│ │ ├── Header.js
│ │ ├── PostList.js
│ │ ├── PostUpvoter.js
│ │ └── Submit.js
│ ├── lib
│ │ ├── init-apollo.js
│ │ └── with-apollo-client.js
│ ├── package.json
│ └── pages
│ │ ├── _app.js
│ │ ├── about.js
│ │ └── index.js
├── with-app-layout
│ ├── package.json
│ ├── pages
│ │ ├── _app.js
│ │ └── index.js
│ └── readme.md
├── with-asset-imports
│ ├── README.md
│ ├── next.config.js
│ ├── package.json
│ ├── pages
│ │ └── index.js
│ └── static
│ │ └── logo.png
├── with-babel-macros
│ ├── .babelrc
│ ├── README.md
│ ├── package.json
│ └── pages
│ │ ├── _document.js
│ │ └── index.js
├── with-carbon-components
│ ├── .gitignore
│ ├── README.md
│ ├── next.config.js
│ ├── package.json
│ ├── pages
│ │ ├── _document.js
│ │ └── index.js
│ └── static
│ │ ├── export.scss
│ │ └── myCustomTheme.scss
├── with-cerebral
│ ├── README.md
│ ├── components
│ │ ├── Clock.js
│ │ └── Page.js
│ ├── modules
│ │ └── clock
│ │ │ ├── actions.js
│ │ │ ├── index.js
│ │ │ ├── provider.js
│ │ │ └── signals.js
│ ├── package.json
│ └── pages
│ │ ├── index.js
│ │ └── other.js
├── with-cloud9
│ ├── README.md
│ ├── package.json
│ ├── pages
│ │ └── index.js
│ └── server.js
├── with-componentdidcatch
│ ├── package.json
│ ├── pages
│ │ ├── _app.js
│ │ └── index.js
│ └── readme.md
├── with-configured-preset-env
│ ├── .babelrc
│ ├── README.md
│ ├── package.json
│ └── pages
│ │ └── index.js
├── with-context-api
│ ├── README.md
│ ├── components
│ │ └── CounterProvider.js
│ ├── package.json
│ └── pages
│ │ ├── _app.js
│ │ └── index.js
├── with-custom-babel-config
│ ├── .babelrc
│ ├── README.md
│ ├── package.json
│ └── pages
│ │ └── index.js
├── with-custom-reverse-proxy
│ ├── .babelrc
│ ├── .eslintrc
│ ├── README.md
│ ├── package.json
│ ├── pages
│ │ └── index.js
│ └── server.js
├── with-cxs
│ ├── README.md
│ ├── package.json
│ └── pages
│ │ ├── _document.js
│ │ └── index.js
├── with-data-prefetch
│ ├── README.md
│ ├── components
│ │ └── link.js
│ ├── package.json
│ └── pages
│ │ ├── article.js
│ │ └── index.js
├── with-docker
│ ├── .dockerignore
│ ├── Dockerfile
│ ├── Dockerfile.multistage
│ ├── README.md
│ ├── next.config.js
│ ├── package.json
│ └── pages
│ │ └── index.js
├── with-dotenv
│ ├── .env
│ ├── README.md
│ ├── next.config.js
│ ├── package.json
│ └── pages
│ │ └── index.js
├── with-draft-js
│ ├── README.md
│ ├── package.json
│ └── pages
│ │ └── index.js
├── with-dynamic-app-layout
│ ├── layouts
│ │ ├── BlueLayout.js
│ │ ├── GreenLayout.js
│ │ └── RedLayout.js
│ ├── pages
│ │ ├── _app.js
│ │ ├── green.js
│ │ ├── index.js
│ │ └── red.js
│ └── readme.md
├── with-dynamic-import
│ ├── README.md
│ ├── components
│ │ ├── Counter.js
│ │ ├── Header.js
│ │ ├── hello1.js
│ │ ├── hello2.js
│ │ ├── hello3.js
│ │ ├── hello4.js
│ │ ├── hello5.js
│ │ ├── hello6.js
│ │ └── hello7.js
│ ├── next.config.js
│ ├── package.json
│ └── pages
│ │ ├── about.js
│ │ └── index.js
├── with-electron
│ ├── README.md
│ ├── main
│ │ ├── index.js
│ │ └── preload.js
│ ├── package.json
│ └── renderer
│ │ ├── next.config.js
│ │ └── pages
│ │ └── start.js
├── with-emotion-fiber
│ ├── README.md
│ ├── features
│ │ └── home.component.js
│ ├── hoc
│ │ └── withEmotion.component.js
│ ├── package.json
│ ├── pages
│ │ ├── _document.js
│ │ └── index.js
│ └── shared
│ │ └── styles.js
├── with-emotion
│ ├── .babelrc
│ ├── README.md
│ ├── package.json
│ └── pages
│ │ └── index.js
├── with-external-scoped-css
│ └── README.md
├── with-external-styled-jsx-sass
│ ├── README.md
│ ├── next.config.js
│ ├── package.json
│ ├── pages
│ │ └── index.js
│ └── styles
│ │ └── style.scss
├── with-fela
│ ├── FelaProvider.js
│ ├── README.md
│ ├── getFelaRenderer.js
│ ├── package.json
│ └── pages
│ │ ├── _document.js
│ │ └── index.js
├── with-firebase-authentication
│ ├── README.md
│ ├── credentials
│ │ ├── client.js
│ │ └── server.js
│ ├── package.json
│ ├── pages
│ │ └── index.js
│ └── server.js
├── with-firebase-cloud-messaging
│ ├── .gitignore
│ ├── README.md
│ ├── next.config.js
│ ├── package.json
│ ├── pages
│ │ └── index.js
│ ├── server.js
│ ├── static
│ │ └── firebase-messaging-sw.js
│ └── utils
│ │ └── webPush.js
├── with-firebase-hosting-and-typescript
│ ├── .babelrc
│ ├── .firebaserc
│ ├── .gitignore
│ ├── README.md
│ ├── firebase.json
│ ├── package.json
│ └── src
│ │ ├── app
│ │ ├── .babelrc
│ │ ├── components
│ │ │ ├── App.tsx
│ │ │ └── Header.tsx
│ │ ├── next.config.js
│ │ ├── pages
│ │ │ ├── about.tsx
│ │ │ └── index.tsx
│ │ ├── tsconfig.json
│ │ └── tslint.json
│ │ ├── functions
│ │ ├── src
│ │ │ ├── app
│ │ │ │ └── next.ts
│ │ │ └── index.ts
│ │ ├── tsconfig.json
│ │ └── tslint.json
│ │ └── public
│ │ └── placeholder.html
├── with-firebase-hosting
│ ├── .firebaserc
│ ├── .gitignore
│ ├── README.md
│ ├── firebase.json
│ ├── package.json
│ └── src
│ │ ├── app
│ │ ├── .babelrc
│ │ ├── components
│ │ │ ├── App.js
│ │ │ └── Header.js
│ │ ├── next.config.js
│ │ └── pages
│ │ │ ├── about.js
│ │ │ └── index.js
│ │ ├── functions
│ │ ├── .babelrc
│ │ └── index.js
│ │ └── public
│ │ └── placeholder.html
├── with-flow
│ ├── .babelrc
│ ├── .eslintrc.json
│ ├── .flowconfig
│ ├── README.md
│ ├── components
│ │ └── Page.js
│ ├── flow-typed
│ │ └── next.js.flow
│ ├── package.json
│ ├── pages
│ │ ├── _app.js
│ │ ├── about.js
│ │ ├── contact.js
│ │ └── index.js
│ └── with-flow.gif
├── with-freactal
│ ├── README.md
│ ├── components
│ │ └── app.js
│ ├── githubApi.js
│ ├── package.json
│ ├── pages
│ │ └── index.js
│ └── provideState.js
├── with-glamor
│ ├── .babelrc
│ ├── README.md
│ ├── next.config.js
│ ├── package.json
│ └── pages
│ │ ├── _document.js
│ │ └── index.js
├── with-glamorous
│ ├── README.md
│ ├── package.json
│ └── pages
│ │ ├── _document.js
│ │ └── index.js
├── with-global-stylesheet-simple
│ └── README.md
├── with-global-stylesheet
│ └── README.md
├── with-google-analytics
│ ├── README.md
│ ├── components
│ │ ├── Header.js
│ │ └── Page.js
│ ├── lib
│ │ └── gtag.js
│ ├── package.json
│ └── pages
│ │ ├── _document.js
│ │ ├── about.js
│ │ ├── contact.js
│ │ └── index.js
├── with-hashed-statics
│ ├── README.md
│ ├── next.config.js
│ ├── package.json
│ ├── pages
│ │ └── index.js
│ └── static
│ │ ├── file.txt
│ │ └── images
│ │ ├── logo.png
│ │ └── logo.svg
├── with-higher-order-component
│ ├── README.md
│ ├── components
│ │ └── Nav.js
│ ├── hocs
│ │ ├── withLanguages.js
│ │ └── withUserAgent.js
│ ├── lib
│ │ └── getDisplayName.js
│ ├── package.json
│ └── pages
│ │ ├── about.js
│ │ └── index.js
├── with-immutable-redux-wrapper
│ ├── README.md
│ ├── components
│ │ ├── AddCount.js
│ │ ├── Clock.js
│ │ └── Page.js
│ ├── package.json
│ ├── pages
│ │ ├── _app.js
│ │ ├── index.js
│ │ └── other.js
│ └── store.js
├── with-ioc
│ ├── .babelrc
│ ├── README.md
│ ├── __tests__
│ │ ├── __snapshots__
│ │ │ ├── blog.page_with_provide.test.js.snap
│ │ │ ├── endpoint.component_with_inject.test.js.snap
│ │ │ └── index.page_without_provide.test.js.snap
│ │ ├── blog.page_with_provide.test.js
│ │ ├── endpoint.component_with_inject.test.js
│ │ └── index.page_without_provide.test.js
│ ├── components
│ │ ├── component1.js
│ │ ├── component2.js
│ │ ├── endbutton.js
│ │ └── endpoint.js
│ ├── jest.config.js
│ ├── jest.setup.js
│ ├── package.json
│ ├── pages
│ │ ├── about.js
│ │ ├── blog.js
│ │ └── index.js
│ ├── routes.js
│ └── server.js
├── with-jest-typescript
│ ├── .babelrc
│ ├── README.md
│ ├── jest.config.js
│ ├── jest.setup.js
│ ├── next.config.js
│ ├── package.json
│ ├── pages
│ │ ├── cars.tsx
│ │ ├── index.tsx
│ │ └── login.tsx
│ ├── src
│ │ ├── components
│ │ │ └── NiceCheckbox
│ │ │ │ ├── index.tsx
│ │ │ │ └── test.tsx
│ │ └── modules
│ │ │ ├── auth
│ │ │ ├── Login.tsx
│ │ │ ├── __tests__
│ │ │ │ └── Login.test.tsx
│ │ │ └── types.ts
│ │ │ └── cars
│ │ │ ├── Detail.tsx
│ │ │ ├── Overview.tsx
│ │ │ ├── __tests__
│ │ │ ├── Detail.test.tsx
│ │ │ └── Overview.test.tsx
│ │ │ └── types.ts
│ └── tsconfig.json
├── with-jest
│ ├── .babelrc
│ ├── README.md
│ ├── __tests__
│ │ ├── __snapshots__
│ │ │ └── index.test.js.snap
│ │ └── index.test.js
│ ├── jest.config.js
│ ├── jest.setup.js
│ ├── package.json
│ └── pages
│ │ └── index.js
├── with-kea
│ ├── .babelrc
│ ├── README.md
│ ├── package.json
│ ├── pages
│ │ ├── _app.js
│ │ └── index.js
│ └── store.js
├── with-loading
│ ├── README.md
│ ├── package.json
│ ├── pages
│ │ ├── _app.js
│ │ ├── _document.js
│ │ ├── about.js
│ │ ├── forever.js
│ │ └── index.js
│ └── static
│ │ └── nprogress.css
├── with-markdown
│ ├── README.md
│ ├── md
│ │ ├── markdown.mdx
│ │ └── other.mdx
│ ├── next.config.js
│ ├── package.json
│ └── pages
│ │ ├── hello.mdx
│ │ └── index.js
├── with-material-ui
│ └── README.md
├── with-mdx
│ ├── README.md
│ ├── components
│ │ └── button.js
│ ├── next.config.js
│ ├── package.json
│ └── pages
│ │ └── index.mdx
├── with-mobx-state-tree-typescript
│ ├── .babelrc
│ ├── README.md
│ ├── components
│ │ ├── Clock.tsx
│ │ └── SampleComponent.tsx
│ ├── next.config.js
│ ├── package.json
│ ├── pages
│ │ ├── _app.tsx
│ │ ├── index.tsx
│ │ └── other.tsx
│ ├── stores
│ │ └── store.ts
│ ├── tsconfig.json
│ └── tslint.json
├── with-mobx-state-tree
│ ├── .babelrc
│ ├── README.md
│ ├── components
│ │ ├── Clock.js
│ │ └── SampleComponent.js
│ ├── package.json
│ ├── pages
│ │ ├── _app.js
│ │ ├── index.js
│ │ └── other.js
│ └── stores
│ │ └── store.js
├── with-mobx
│ ├── .babelrc
│ ├── README.md
│ ├── components
│ │ ├── Clock.js
│ │ └── Page.js
│ ├── package.json
│ ├── pages
│ │ ├── _app.js
│ │ ├── index.js
│ │ └── other.js
│ └── store.js
├── with-mocha
│ ├── .babelrc
│ ├── README.md
│ ├── mocha.setup.js
│ ├── package.json
│ ├── pages
│ │ └── index.js
│ └── test
│ │ ├── index.test.js
│ │ └── mocha.opts
├── with-next-css
│ ├── README.md
│ ├── next.config.js
│ ├── package.json
│ ├── pages
│ │ └── index.js
│ └── style.css
├── with-next-i18next
│ └── README.md
├── with-next-less
│ ├── README.md
│ ├── next.config.js
│ ├── package.json
│ ├── pages
│ │ ├── _document.js
│ │ └── index.js
│ └── style.less
├── with-next-page-transitions
│ ├── README.md
│ ├── components
│ │ └── Loader.js
│ ├── package.json
│ └── pages
│ │ ├── _app.js
│ │ ├── _document.js
│ │ ├── about.js
│ │ └── index.js
├── with-next-routes
│ ├── README.md
│ ├── package.json
│ ├── pages
│ │ ├── about.js
│ │ ├── blog.js
│ │ └── index.js
│ ├── routes.js
│ └── server.js
├── with-next-sass
│ ├── README.md
│ ├── next.config.js
│ ├── package.json
│ ├── pages
│ │ ├── _document.js
│ │ └── index.js
│ └── styles
│ │ └── style.scss
├── with-noscript
│ ├── README.md
│ ├── components
│ │ └── Noscript.js
│ ├── next.config.js
│ ├── package.json
│ ├── pages
│ │ └── index.js
│ └── static
│ │ └── img
│ │ ├── angular.jpg
│ │ ├── nextjs.png
│ │ ├── reactjs.png
│ │ └── vuejs.png
├── with-now-env
│ ├── README.md
│ ├── next.config.js
│ ├── now-secrets.json
│ ├── now.json
│ ├── package.json
│ └── pages
│ │ └── index.js
├── with-pkg
│ ├── README.md
│ ├── index.js
│ ├── package.json
│ ├── pages
│ │ └── index.js
│ └── server.js
├── with-polyfills
│ ├── README.md
│ ├── client
│ │ └── polyfills.js
│ ├── next.config.js
│ ├── package.json
│ └── pages
│ │ └── index.js
├── with-portals
│ ├── README.md
│ ├── components
│ │ ├── Modal.js
│ │ └── Portal.js
│ ├── package.json
│ └── pages
│ │ ├── _document.js
│ │ └── index.js
├── with-prefetching
│ ├── README.md
│ ├── components
│ │ └── Header.js
│ ├── package.json
│ └── pages
│ │ ├── _app.js
│ │ ├── about.js
│ │ ├── contact.js
│ │ ├── features.js
│ │ └── index.js
├── with-pretty-url-routing
│ ├── README.md
│ ├── package.json
│ ├── pages
│ │ ├── greeting.js
│ │ └── index.js
│ ├── routes.js
│ └── server.js
├── with-react-ga
│ ├── README.md
│ ├── package.json
│ ├── pages
│ │ ├── _app.js
│ │ ├── about.js
│ │ └── index.js
│ └── utils
│ │ └── analytics.js
├── with-react-helmet
│ ├── README.md
│ ├── package.json
│ └── pages
│ │ ├── _document.js
│ │ ├── about.js
│ │ └── index.js
├── with-react-intl
│ ├── .babelrc
│ ├── .gitignore
│ ├── README.md
│ ├── components
│ │ ├── Layout.js
│ │ └── Nav.js
│ ├── lang
│ │ ├── en.json
│ │ └── fr.json
│ ├── lib
│ │ └── withIntl.js
│ ├── package.json
│ ├── pages
│ │ ├── _app.js
│ │ ├── _document.js
│ │ ├── about.js
│ │ └── index.js
│ ├── scripts
│ │ └── default-lang.js
│ └── server.js
├── with-react-jss
│ ├── .babelrc
│ ├── README.md
│ ├── package.json
│ └── pages
│ │ ├── _app.js
│ │ ├── _document.js
│ │ └── index.js
├── with-react-md
│ ├── README.md
│ ├── next.config.js
│ ├── package.json
│ ├── pages
│ │ └── index.js
│ └── static
│ │ └── react-md.light_blue-yellow.min.css
├── with-react-native-web
│ ├── README.md
│ ├── next.config.js
│ ├── package.json
│ └── pages
│ │ ├── _document.js
│ │ └── index.js
├── with-react-relay-network-modern
│ ├── .babelrc
│ ├── .env
│ ├── .gitignore
│ ├── .graphqlconfig
│ ├── README.md
│ ├── components
│ │ ├── BlogPostPreview.js
│ │ └── BlogPosts.js
│ ├── lib
│ │ └── createEnvironment
│ │ │ ├── client.js
│ │ │ ├── index.js
│ │ │ └── server.js
│ ├── next.config.js
│ ├── package.json
│ ├── pages
│ │ ├── _app.js
│ │ └── index.js
│ └── schema
│ │ └── init-schema.graphql
├── with-react-toolbox
│ ├── README.md
│ ├── package.json
│ ├── pages
│ │ └── index.js
│ └── static
│ │ ├── theme.css
│ │ └── theme.js
├── with-react-useragent
│ ├── README.md
│ ├── package.json
│ └── pages
│ │ ├── _app.js
│ │ └── index.js
├── with-react-uwp
│ ├── README.md
│ ├── components
│ │ └── ThemeWrapper.js
│ ├── package.json
│ └── pages
│ │ ├── _document.js
│ │ └── index.js
├── with-react-with-styles
│ ├── README.md
│ ├── defaultTheme.js
│ ├── package.json
│ ├── pages
│ │ ├── _document.js
│ │ └── index.js
│ └── withStyles.js
├── with-reasonml
│ ├── .babelrc
│ ├── .gitignore
│ ├── README.md
│ ├── bindings
│ │ └── Next.re
│ ├── bsconfig.json
│ ├── components
│ │ ├── Counter.re
│ │ └── Header.re
│ ├── index.js
│ ├── next.config.js
│ ├── package.json
│ └── pages
│ │ ├── about.re
│ │ └── index.re
├── with-rebass
│ ├── .babelrc
│ ├── README.md
│ ├── package.json
│ └── pages
│ │ ├── _document.js
│ │ └── index.js
├── with-recompose
│ ├── .babelrc
│ ├── README.md
│ ├── package.json
│ └── pages
│ │ └── index.js
├── with-redux-code-splitting
│ ├── README.md
│ ├── config
│ │ └── redux.js
│ ├── containers
│ │ ├── about.js
│ │ └── homepage.js
│ ├── package.json
│ └── pages
│ │ ├── about.js
│ │ └── index.js
├── with-redux-observable
│ ├── README.md
│ ├── components
│ │ └── CharacterInfo.js
│ ├── demo.png
│ ├── package.json
│ ├── pages
│ │ ├── _app.js
│ │ ├── index.js
│ │ └── other.js
│ └── redux
│ │ ├── actionTypes.js
│ │ ├── actions.js
│ │ ├── epics.js
│ │ ├── index.js
│ │ └── reducer.js
├── with-redux-reselect-recompose
│ ├── .babelrc
│ ├── .eslintrc
│ ├── .gitignore
│ ├── README.md
│ ├── actions
│ │ └── index.js
│ ├── components
│ │ ├── addCount.js
│ │ ├── clock.js
│ │ └── page.js
│ ├── constants
│ │ └── actionTypes.js
│ ├── containers
│ │ └── page.js
│ ├── package.json
│ ├── pages
│ │ ├── index.js
│ │ └── other.js
│ ├── reducers
│ │ ├── count.js
│ │ └── index.js
│ ├── selectors
│ │ └── index.js
│ └── store.js
├── with-redux-saga
│ ├── README.md
│ ├── actions.js
│ ├── components
│ │ ├── clock.js
│ │ ├── counter.js
│ │ └── page.js
│ ├── package.json
│ ├── pages
│ │ ├── _app.js
│ │ ├── index.js
│ │ └── other.js
│ ├── reducer.js
│ ├── saga.js
│ └── store.js
├── with-redux-wrapper
│ ├── .npmrc
│ ├── README.md
│ ├── components
│ │ ├── AddCount.js
│ │ ├── Clock.js
│ │ └── Page.js
│ ├── package.json
│ ├── pages
│ │ ├── _app.js
│ │ ├── index.js
│ │ └── other.js
│ └── store.js
├── with-redux
│ ├── README.md
│ ├── components
│ │ ├── clock.js
│ │ ├── counter.js
│ │ └── examples.js
│ ├── lib
│ │ └── with-redux-store.js
│ ├── package.json
│ ├── pages
│ │ ├── _app.js
│ │ └── index.js
│ └── store.js
├── with-reflux
│ ├── README.md
│ ├── actions
│ │ └── actions.js
│ ├── package.json
│ ├── pages
│ │ └── index.js
│ └── store
│ │ └── counterStore.js
├── with-refnux
│ ├── README.md
│ ├── helpers
│ │ ├── getStore.js
│ │ └── withRefnux.js
│ ├── package.json
│ ├── pages
│ │ ├── page1.js
│ │ └── page2.js
│ └── store
│ │ ├── counterIncrement.js
│ │ ├── getInitialState.js
│ │ ├── getStore.js
│ │ └── setTitle.js
├── with-relay-modern
│ ├── .babelrc
│ ├── .env
│ ├── .gitignore
│ ├── .graphqlconfig
│ ├── README.md
│ ├── components
│ │ ├── BlogPostPreview.js
│ │ └── BlogPosts.js
│ ├── lib
│ │ ├── RelayProvider.js
│ │ ├── createRelayEnvironment.js
│ │ └── withData.js
│ ├── next.config.js
│ ├── package.json
│ ├── pages
│ │ └── index.js
│ └── schema
│ │ └── init-schema.graphql
├── with-rematch
│ ├── README.md
│ ├── package.json
│ ├── pages
│ │ ├── github-users.js
│ │ └── index.js
│ └── shared
│ │ ├── components
│ │ ├── counter-display.js
│ │ └── header.js
│ │ ├── models
│ │ ├── counter.js
│ │ ├── github.js
│ │ └── index.js
│ │ ├── store.js
│ │ └── utils
│ │ └── withRematch.js
├── with-scoped-stylesheets-and-postcss
│ └── README.md
├── with-segment-analytics
│ ├── README.md
│ ├── components
│ │ └── Header.js
│ ├── package.json
│ └── pages
│ │ ├── _document.js
│ │ ├── about.js
│ │ ├── contact.js
│ │ └── index.js
├── with-semantic-ui
│ ├── README.md
│ ├── next.config.js
│ ├── package.json
│ └── pages
│ │ ├── _document.js
│ │ └── index.js
├── with-sentry
│ ├── README.md
│ ├── package.json
│ └── pages
│ │ ├── _app.js
│ │ └── index.js
├── with-shallow-routing
│ ├── README.md
│ ├── package.json
│ └── pages
│ │ ├── about.js
│ │ └── index.js
├── with-sitemap-and-robots-express-server-typescript
│ ├── .babelrc
│ ├── .gitignore
│ ├── .npmignore
│ ├── README.md
│ ├── now.json
│ ├── package.json
│ ├── src
│ │ ├── components
│ │ │ ├── RobotsLink.tsx
│ │ │ └── SitemapLink.tsx
│ │ ├── pages
│ │ │ └── index.tsx
│ │ ├── server
│ │ │ ├── app.ts
│ │ │ ├── posts.ts
│ │ │ └── sitemapAndRobots.ts
│ │ └── static
│ │ │ └── robots.txt
│ ├── tsconfig.express.json
│ ├── tsconfig.next.json
│ └── tslint.json
├── with-sitemap-and-robots-express-server
│ ├── .gitignore
│ ├── .npmignore
│ ├── README.md
│ ├── now.json
│ ├── package.json
│ ├── pages
│ │ └── index.js
│ ├── server
│ │ ├── app.js
│ │ ├── posts.js
│ │ └── sitemapAndRobots.js
│ └── static
│ │ └── robots.txt
├── with-slate
│ ├── README.md
│ ├── package.json
│ └── pages
│ │ └── index.js
├── with-socket.io
│ ├── README.md
│ ├── package.json
│ ├── pages
│ │ ├── _app.js
│ │ ├── clone.js
│ │ └── index.js
│ └── server.js
├── with-static-export
│ ├── README.md
│ ├── components
│ │ └── post.js
│ ├── next.config.js
│ ├── package.json
│ ├── pages
│ │ ├── index.js
│ │ └── post.js
│ └── server.js
├── with-storybook
│ ├── .storybook
│ │ ├── addons.js
│ │ └── config.js
│ ├── README.md
│ ├── components
│ │ └── index.js
│ ├── package.json
│ ├── pages
│ │ └── index.js
│ └── stories
│ │ └── index.stories.js
├── with-strict-csp-hash
│ ├── README.md
│ ├── package.json
│ └── pages
│ │ ├── _document.js
│ │ └── index.js
├── with-strict-csp
│ ├── README.md
│ ├── csp.js
│ ├── package.json
│ ├── pages
│ │ ├── _document.js
│ │ └── index.js
│ └── server.js
├── with-style-sheet
│ ├── .babelrc
│ ├── README.md
│ ├── next.config.js
│ ├── package.json
│ └── pages
│ │ ├── _document.js
│ │ └── index.js
├── with-styled-components
│ ├── .babelrc
│ ├── README.md
│ ├── package.json
│ └── pages
│ │ ├── _document.js
│ │ └── index.js
├── with-styled-jsx-plugins
│ ├── .babelrc
│ ├── README.md
│ ├── package.json
│ └── pages
│ │ └── index.js
├── with-styled-jsx-postcss
│ └── readme.md
├── with-styled-jsx-scss
│ ├── .babelrc
│ ├── README.md
│ ├── package.json
│ └── pages
│ │ └── index.js
├── with-styletron
│ ├── README.md
│ ├── layout.js
│ ├── next.config.js
│ ├── package.json
│ ├── pages
│ │ ├── _document.js
│ │ └── index.js
│ └── styletron.js
├── with-sw-precache
│ ├── .babelrc
│ ├── README.md
│ ├── next.config.js
│ ├── package.json
│ ├── pages
│ │ └── index.js
│ └── server.js
├── with-tailwindcss
│ ├── README.md
│ ├── components
│ │ └── nav.js
│ ├── next.config.js
│ ├── package.json
│ ├── pages
│ │ ├── _app.js
│ │ └── index.js
│ ├── postcss.config.js
│ ├── styles
│ │ ├── button.css
│ │ └── index.css
│ └── tailwind.config.js
├── with-ts-node
│ ├── README.md
│ ├── next.config.js
│ ├── nodemon.json
│ ├── package.json
│ ├── pages
│ │ ├── a.tsx
│ │ ├── b.tsx
│ │ └── index.tsx
│ ├── server
│ │ └── index.ts
│ └── tsconfig.json
├── with-typescript
│ ├── .babelrc
│ ├── README.md
│ ├── components
│ │ └── Layout.tsx
│ ├── next.config.js
│ ├── package.json
│ ├── pages
│ │ ├── about.tsx
│ │ └── index.tsx
│ └── tsconfig.json
├── with-typestyle
│ ├── README.md
│ ├── package.json
│ └── pages
│ │ ├── _document.js
│ │ └── index.js
├── with-typings-for-css-modules
│ ├── .babelrc
│ ├── README.md
│ ├── next.config.js
│ ├── package.json
│ ├── pages
│ │ └── index.tsx
│ ├── style.css
│ ├── style.css.d.ts
│ └── tsconfig.json
├── with-universal-configuration-runtime
│ ├── README.md
│ ├── next.config.js
│ ├── package.json
│ └── pages
│ │ └── index.js
├── with-universal-configuration
│ ├── .babelrc.js
│ ├── README.md
│ ├── env-config.js
│ ├── package.json
│ └── pages
│ │ └── index.js
├── with-unstated
│ ├── .gitignore
│ ├── README.md
│ ├── components
│ │ ├── Clock.js
│ │ ├── Counter.js
│ │ └── index.js
│ ├── containers
│ │ ├── ClockContainer.js
│ │ ├── CounterContainer.js
│ │ └── index.js
│ ├── package.json
│ └── pages
│ │ ├── _app.js
│ │ ├── about.js
│ │ └── index.js
├── with-url-object-routing
│ ├── README.md
│ ├── package.json
│ ├── pages
│ │ ├── about.js
│ │ └── index.js
│ └── server.js
├── with-videojs
│ ├── README.md
│ ├── components
│ │ └── Player.js
│ ├── next.config.js
│ ├── package.json
│ └── pages
│ │ └── index.js
├── with-webassembly
│ ├── .gitignore
│ ├── Cargo.toml
│ ├── add.wasm
│ ├── next.config.js
│ ├── package.json
│ ├── pages
│ │ └── index.js
│ ├── readme.md
│ ├── server.js
│ └── src
│ │ └── add.rs
├── with-webpack-bundle-analyzer
│ └── README.md
├── with-webpack-bundle-size-analyzer
│ ├── README.md
│ ├── next.config.js
│ ├── package.json
│ └── pages
│ │ ├── about.js
│ │ ├── contact.js
│ │ └── index.js
├── with-yarn-workspaces
│ ├── README.md
│ ├── package.json
│ └── packages
│ │ ├── bar
│ │ ├── index.js
│ │ └── package.json
│ │ ├── foo
│ │ ├── index.js
│ │ └── package.json
│ │ └── web-app
│ │ ├── next.config.js
│ │ ├── package.json
│ │ └── pages
│ │ └── index.js
└── with-zones
│ ├── README.md
│ ├── blog
│ ├── .gitignore
│ ├── next.config.js
│ ├── now.json
│ ├── package.json
│ └── pages
│ │ └── blog.js
│ ├── home
│ ├── .gitignore
│ ├── components
│ │ └── Header.js
│ ├── next.config.js
│ ├── now.json
│ ├── package.json
│ ├── pages
│ │ ├── about.js
│ │ └── index.js
│ └── static
│ │ ├── nextjs.png
│ │ └── zeit.png
│ ├── package.json
│ ├── rules-dev.json
│ └── rules-prod.json
├── jest.config.js
├── lerna.json
├── license.md
├── package.json
├── packages
├── next-server
│ ├── asset.js
│ ├── config.js
│ ├── constants.js
│ ├── dynamic.js
│ ├── head.js
│ ├── index.js
│ ├── lib
│ │ ├── asset.js
│ │ ├── constants.js
│ │ ├── dynamic.js
│ │ ├── event-emitter.js
│ │ ├── head.js
│ │ ├── loadable-capture.js
│ │ ├── loadable.js
│ │ ├── router
│ │ │ ├── router.js
│ │ │ └── shallow-equals.js
│ │ ├── runtime-config.js
│ │ ├── side-effect.js
│ │ └── utils.js
│ ├── license.md
│ ├── next-config.js
│ ├── package.json
│ ├── server
│ │ ├── config.js
│ │ ├── get-dynamic-import-bundles.ts
│ │ ├── get-page-files.ts
│ │ ├── lib
│ │ │ └── path-match.js
│ │ ├── next-server.ts
│ │ ├── render.js
│ │ ├── require.ts
│ │ ├── router.ts
│ │ ├── send-html.ts
│ │ ├── serve-static.ts
│ │ └── utils.ts
│ ├── taskfile-typescript.js
│ ├── taskfile.js
│ └── tsconfig.json
└── next
│ ├── README.md
│ ├── app.js
│ ├── asset.js
│ ├── babel.js
│ ├── bin
│ ├── next
│ ├── next-build
│ ├── next-dev
│ ├── next-export
│ ├── next-init
│ └── next-start
│ ├── build
│ ├── babel
│ │ ├── plugins
│ │ │ ├── commonjs.ts
│ │ │ ├── next-to-next-server.ts
│ │ │ └── react-loadable-plugin.ts
│ │ └── preset.ts
│ ├── compiler.ts
│ ├── generate-build-id.ts
│ ├── index.ts
│ ├── is-writeable.ts
│ ├── webpack-config.js
│ ├── webpack
│ │ ├── loaders
│ │ │ ├── emit-file-loader.js
│ │ │ ├── hot-self-accept-loader.js
│ │ │ └── next-babel-loader.js
│ │ ├── plugins
│ │ │ ├── assets-size-plugin.js
│ │ │ ├── build-manifest-plugin.js
│ │ │ ├── chunk-names-plugin.js
│ │ │ ├── nextjs-require-cache-hot-reloader.js
│ │ │ ├── nextjs-ssr-import.js
│ │ │ ├── nextjs-ssr-module-cache.js
│ │ │ ├── pages-manifest-plugin.js
│ │ │ ├── pages-plugin.js
│ │ │ ├── react-loadable-plugin.js
│ │ │ └── unlink-file-plugin.js
│ │ └── utils.js
│ └── write-build-id.ts
│ ├── client.js
│ ├── client
│ ├── dev-error-overlay
│ │ ├── eventsource.js
│ │ ├── format-webpack-messages.js
│ │ └── hot-dev-client.js
│ ├── error-boundary.js
│ ├── head-manager.js
│ ├── index.js
│ ├── link.js
│ ├── next-dev.js
│ ├── next.js
│ ├── noop.js
│ ├── on-demand-entries-client.js
│ ├── page-loader.js
│ ├── router.js
│ ├── source-map-support.js
│ ├── webpack-hot-middleware-client.js
│ └── with-router.js
│ ├── config.js
│ ├── constants.js
│ ├── document.js
│ ├── dynamic.js
│ ├── error.js
│ ├── export
│ └── index.js
│ ├── head.js
│ ├── lib
│ ├── constants.js
│ └── promisify.js
│ ├── license.md
│ ├── link.js
│ ├── package.json
│ ├── pages
│ ├── _app.js
│ ├── _document.js
│ └── _error.js
│ ├── router.js
│ ├── server
│ ├── error-debug.js
│ ├── hot-reloader.js
│ ├── lib
│ │ ├── error-overlay-middleware.js
│ │ ├── start-server.js
│ │ └── utils.js
│ ├── next-dev-server.js
│ ├── next.js
│ └── on-demand-entry-handler.js
│ ├── taskfile-typescript.js
│ ├── taskfile.js
│ ├── tsconfig.json
│ └── types
│ └── index.d.ts
├── readme.md
└── test
├── .babelrc
├── .gitignore
├── integration
├── app-aspath
│ ├── pages
│ │ ├── _app.js
│ │ └── index.js
│ └── test
│ │ └── index.test.js
├── app-document
│ ├── pages
│ │ ├── _app.js
│ │ ├── _document.js
│ │ ├── about.js
│ │ ├── index.js
│ │ └── shared.js
│ ├── shared-module.js
│ └── test
│ │ ├── client.js
│ │ ├── csp.js
│ │ ├── index.test.js
│ │ └── rendering.js
├── babel
│ ├── .babelrc
│ ├── pages
│ │ └── index.js
│ └── test
│ │ ├── .babelrc
│ │ ├── index.test.js
│ │ └── rendering.js
├── basic
│ ├── components
│ │ ├── hello-chunkfilename.js
│ │ ├── hello-context.js
│ │ ├── hello.jsx
│ │ ├── hello1.js
│ │ ├── hello2.js
│ │ ├── hello3.js
│ │ ├── hello4.js
│ │ ├── hmr
│ │ │ └── dynamic.js
│ │ ├── welcome.js
│ │ └── world.jsx
│ ├── lib
│ │ ├── async-function.js
│ │ ├── cdm.js
│ │ └── data.json
│ ├── next.config.js
│ ├── pages
│ │ ├── async-props.js
│ │ ├── custom-encoding.js
│ │ ├── custom-extension.jsx
│ │ ├── default-head.js
│ │ ├── dynamic
│ │ │ ├── bundle.js
│ │ │ ├── chunkfilename.js
│ │ │ ├── function.js
│ │ │ ├── head.js
│ │ │ ├── index.js
│ │ │ ├── multiple-modules.js
│ │ │ ├── no-chunk.js
│ │ │ ├── no-ssr-custom-loading.js
│ │ │ ├── no-ssr.js
│ │ │ ├── ssr-true.js
│ │ │ └── ssr.js
│ │ ├── empty-get-initial-props.js
│ │ ├── error-in-the-browser-global-scope.js
│ │ ├── error-in-the-global-scope.js
│ │ ├── error-inside-browser-page.js
│ │ ├── error-inside-page.js
│ │ ├── exports.js
│ │ ├── fragment-syntax.js
│ │ ├── head.js
│ │ ├── hmr
│ │ │ ├── about.js
│ │ │ ├── contact.js
│ │ │ ├── counter.js
│ │ │ ├── error-in-gip.js
│ │ │ ├── index.js
│ │ │ ├── style-dynamic-component.js
│ │ │ ├── style-stateful-component.js
│ │ │ └── style.js
│ │ ├── index.js
│ │ ├── json.js
│ │ ├── link.js
│ │ ├── nav
│ │ │ ├── about.js
│ │ │ ├── as-path-pushstate.js
│ │ │ ├── as-path-using-router.js
│ │ │ ├── as-path.js
│ │ │ ├── hash-changes.js
│ │ │ ├── head-1.js
│ │ │ ├── head-2.js
│ │ │ ├── index.js
│ │ │ ├── on-click.js
│ │ │ ├── pass-href-prop.js
│ │ │ ├── querystring.js
│ │ │ ├── redirect.js
│ │ │ ├── self-reload.js
│ │ │ ├── shallow-routing.js
│ │ │ ├── url-prop-change.js
│ │ │ └── with-hoc.js
│ │ ├── nested-cdm
│ │ │ └── index.js
│ │ ├── no-default-export.js
│ │ ├── process-env.js
│ │ ├── read-only-object-error.js
│ │ ├── stateless.js
│ │ ├── styled-jsx.js
│ │ ├── url-prop-override.js
│ │ ├── url-prop.js
│ │ ├── using-asset
│ │ │ ├── asset.js
│ │ │ └── index.js
│ │ └── with-cdm.js
│ └── test
│ │ ├── asset.js
│ │ ├── client-navigation.js
│ │ ├── dynamic.js
│ │ ├── error-recovery.js
│ │ ├── hmr.js
│ │ ├── index.test.js
│ │ ├── process-env.js
│ │ └── rendering.js
├── config
│ ├── .gitignore
│ ├── components
│ │ ├── hello-webpack-css.css
│ │ ├── hello-webpack-css.js
│ │ └── hello-webpack-sass.scss
│ ├── next.config.js
│ ├── node_modules
│ │ └── css-framework
│ │ │ └── framework.css
│ ├── pages
│ │ ├── build-id.js
│ │ ├── next-config.js
│ │ └── webpack-css.js
│ └── test
│ │ ├── client.js
│ │ ├── index.test.js
│ │ └── rendering.js
├── custom-server
│ ├── next.config.js
│ ├── pages
│ │ ├── asset.js
│ │ └── index.js
│ ├── server.js
│ └── test
│ │ └── index.test.js
├── dist-dir
│ ├── next.config.js
│ ├── pages
│ │ └── index.js
│ └── test
│ │ └── index.test.js
├── export
│ ├── .gitignore
│ ├── components
│ │ └── hello.js
│ ├── next.config.js
│ ├── pages
│ │ ├── about.js
│ │ ├── asset.js
│ │ ├── button-link.js
│ │ ├── counter.js
│ │ ├── dynamic-imports.js
│ │ ├── dynamic.js
│ │ ├── get-initial-props-with-no-query.js
│ │ ├── index.js
│ │ ├── level1
│ │ │ ├── about.js
│ │ │ └── index.js
│ │ └── query.js
│ └── test
│ │ ├── browser.js
│ │ ├── dev.js
│ │ ├── index.test.js
│ │ └── ssr.js
├── filesystempublicroutes
│ ├── next.config.js
│ ├── pages
│ │ ├── exportpathmap-route.js
│ │ └── index.js
│ ├── server.js
│ └── test
│ │ └── index.test.js
├── lambdas
│ ├── next.config.js
│ ├── pages
│ │ ├── fetch.js
│ │ └── index.js
│ └── test
│ │ └── index.test.js
├── ondemand
│ ├── components
│ │ └── hello.js
│ ├── next.config.js
│ ├── pages
│ │ ├── about.js
│ │ ├── index.js
│ │ ├── nav
│ │ │ ├── dynamic.js
│ │ │ └── index.js
│ │ └── third.js
│ └── test
│ │ └── index.test.js
├── page-extensions
│ ├── .babelrc
│ ├── next.config.js
│ ├── pages
│ │ └── hmr
│ │ │ └── some-page.tsx
│ └── test
│ │ ├── .babelrc
│ │ ├── hmr.js
│ │ └── index.test.js
├── production-config
│ ├── next.config.js
│ ├── pages
│ │ ├── _app.js
│ │ └── index.js
│ ├── styles.css
│ └── test
│ │ └── index.test.js
├── production
│ ├── components
│ │ ├── hello-context.js
│ │ ├── hello1.js
│ │ ├── hello2.js
│ │ └── welcome.js
│ ├── info.json
│ ├── next.config.js
│ ├── pages
│ │ ├── about.js
│ │ ├── counter.js
│ │ ├── dynamic
│ │ │ ├── bundle.js
│ │ │ ├── index.js
│ │ │ ├── no-chunk.js
│ │ │ ├── no-ssr-custom-loading.js
│ │ │ ├── no-ssr.js
│ │ │ ├── ssr-true.js
│ │ │ └── ssr.js
│ │ ├── error-in-browser-render-status-code.js
│ │ ├── error-in-browser-render.js
│ │ ├── error-in-ssr-render.js
│ │ ├── finish-response.js
│ │ ├── index.js
│ │ ├── prefetch.js
│ │ └── process-env.js
│ ├── static
│ │ └── data
│ │ │ └── item.txt
│ └── test
│ │ ├── dynamic.js
│ │ ├── index.test.js
│ │ ├── process-env.js
│ │ └── security.js
├── size-limit
│ ├── next.config.js
│ ├── pages
│ │ ├── about.js
│ │ └── index.js
│ └── test
│ │ └── index.test.js
└── with-router
│ ├── components
│ └── header-nav.js
│ ├── pages
│ ├── _app.js
│ ├── a.js
│ └── b.js
│ └── test
│ └── index.test.js
├── isolated
├── _resolvedata
│ ├── .gitignore
│ ├── aa
│ │ └── index.js
│ ├── bb
│ │ └── index.json
│ ├── cc
│ │ ├── index.js
│ │ └── index.json
│ ├── one.js
│ ├── one.json
│ ├── server
│ │ ├── pages-manifest.json
│ │ └── static
│ │ │ └── development
│ │ │ └── pages
│ │ │ ├── _error.js
│ │ │ ├── index.js
│ │ │ ├── non-existent-child.js
│ │ │ └── world.js
│ ├── two.json
│ ├── with-function
│ │ └── next.config.js
│ └── without-function
│ │ └── next.config.js
├── config.test.js
├── require-page.test.js
└── webpack-utils.test.js
├── jest-global-setup.js
├── jest-global-teardown.js
├── lib
├── next-test-utils.js
└── next-webdriver.js
└── unit
├── EventEmitter.test.js
├── getDisplayName.test.js
├── loadGetInitialProps.test.js
├── router.test.js
└── shallow-equal.test.js
/.github/ISSUE_TEMPLATE/8.Question_about_next.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Question about Next.js
3 | about: If you have a question related to Next.js or the examples. Reach out to the community on https://spectrum.chat/next-js
4 | ---
5 |
6 | # Question about Next.js
7 |
8 | Questions should be posted on https://spectrum.chat/next-js
9 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/9.Nextjs.org_showcase.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Request to be added to the showcase on nextjs.org
3 | about: Apply for your project to be added to nextjs.org
4 |
5 | ---
6 |
7 | # Request to be added to the showcase on nextjs.org
8 |
9 | - Name of company:
10 | - Url:
11 | - Testimonial about Next.js (optional):
12 |
--------------------------------------------------------------------------------
/.github/lock.yml:
--------------------------------------------------------------------------------
1 | # Configuration for lock-threads - https://github.com/dessant/lock-threads
2 |
3 | # Number of days of inactivity before a closed issue or pull request is locked
4 | daysUntilLock: 365
5 | # Comment to post before locking. Set to `false` to disable
6 | lockComment: false
7 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # build output
2 | dist
3 | .next
4 |
5 | # dependencies
6 | node_modules
7 | package-lock.json
8 | yarn.lock
9 | test/node_modules
10 |
11 | # logs & pids
12 | *.log
13 | pids
14 |
15 | # coverage
16 | .nyc_output
17 | coverage
18 |
19 | # test output
20 | test/**/out
21 | .DS_Store
22 |
23 | # Editors
24 | **/.idea
25 |
--------------------------------------------------------------------------------
/.npmrc:
--------------------------------------------------------------------------------
1 | save-exact = true
2 | tag-version-prefix=""
3 |
--------------------------------------------------------------------------------
/bench/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "next-bench",
3 | "scripts": {
4 | "build": "next build",
5 | "start": "NODE_ENV=production npm run build && NODE_ENV=production next start",
6 | "bench:stateless": "ab -c1 -n3000 http://0.0.0.0:3000/stateless",
7 | "bench:stateless-big": "ab -c1 -n500 http://0.0.0.0:3000/stateless-big"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/bench/pages/stateless-big.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | export default () => {
4 | return (
5 |
8 | )
9 | }
10 |
11 | const items = () => {
12 | var out = new Array(10000)
13 | for (let i = 0; i < out.length; i++) {
14 | out[i] = This is row {i + 1}
15 | }
16 | return out
17 | }
18 |
--------------------------------------------------------------------------------
/bench/pages/stateless.js:
--------------------------------------------------------------------------------
1 | export default () => My component!
2 |
--------------------------------------------------------------------------------
/errors/generatebuildid-not-a-string.md:
--------------------------------------------------------------------------------
1 | # generateBuildId did not return a string
2 |
3 | #### Why This Error Occurred
4 |
5 | The most common cause for this issue is a custom `next.config.js` with the `generateBuildId` method defined, but it does not return a string.
6 |
7 | #### Possible Ways to Fix It
8 |
9 | Always return a string from generateBuildId.
10 |
--------------------------------------------------------------------------------
/examples/active-class-name/pages/about.js:
--------------------------------------------------------------------------------
1 | import Nav from '../components/Nav'
2 |
3 | export default () => (
4 |
5 |
6 |
Hello, I'm About.js
7 |
8 | )
9 |
--------------------------------------------------------------------------------
/examples/active-class-name/pages/index.js:
--------------------------------------------------------------------------------
1 | import Nav from '../components/Nav'
2 |
3 | export default () => (
4 |
5 |
6 |
Hello, I'm the home page
7 |
8 | )
9 |
--------------------------------------------------------------------------------
/examples/analyze-bundles/pages/about.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 | About us
3 | )
4 |
--------------------------------------------------------------------------------
/examples/analyze-bundles/pages/contact.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 |
3 | This is the contact page.
4 |
5 | )
6 |
--------------------------------------------------------------------------------
/examples/basic-css/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "basic-css",
3 | "version": "1.0.0",
4 | "scripts": {
5 | "dev": "next",
6 | "build": "next build",
7 | "start": "next start"
8 | },
9 | "dependencies": {
10 | "next": "latest",
11 | "react": "^16.0.0",
12 | "react-dom": "^16.0.0"
13 | },
14 | "license": "ISC"
15 | }
16 |
--------------------------------------------------------------------------------
/examples/basic-export/.gitignore:
--------------------------------------------------------------------------------
1 | out
2 |
--------------------------------------------------------------------------------
/examples/basic-export/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "hello-world",
3 | "version": "1.0.0",
4 | "scripts": {
5 | "dev": "next",
6 | "build": "next build",
7 | "start": "next start",
8 | "export": "next export"
9 | },
10 | "dependencies": {
11 | "next": "latest",
12 | "react": "^16.0.0",
13 | "react-dom": "^16.0.0"
14 | },
15 | "license": "ISC"
16 | }
17 |
--------------------------------------------------------------------------------
/examples/basic-export/pages/about.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 | About us
3 | )
4 |
--------------------------------------------------------------------------------
/examples/basic-export/pages/about2.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 | About 2
3 | )
4 |
--------------------------------------------------------------------------------
/examples/basic-export/pages/day/index.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 | Hello Day
3 | )
4 |
--------------------------------------------------------------------------------
/examples/basic-export/pages/index.js:
--------------------------------------------------------------------------------
1 | import Link from 'next/link'
2 | export default () => (
3 |
4 | )
5 |
--------------------------------------------------------------------------------
/examples/custom-charset/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "custom-server",
3 | "version": "1.0.0",
4 | "scripts": {
5 | "dev": "node server.js",
6 | "build": "next build",
7 | "start": "NODE_ENV=production node server.js"
8 | },
9 | "dependencies": {
10 | "next": "latest",
11 | "react": "^16.0.0",
12 | "react-dom": "^16.0.0"
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/examples/custom-charset/pages/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | export default () => áéíóöúü
4 |
--------------------------------------------------------------------------------
/examples/custom-server-actionhero/config/routes.js:
--------------------------------------------------------------------------------
1 | exports['default'] = {
2 | routes: (api) => {
3 | return {
4 | get: [
5 | { path: '/', matchTrailingPathParts: true, action: 'render' }
6 | ]
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/examples/custom-server-actionhero/dump.rdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oddcommit/Next-All-App/ae33f3f6a81ae352236b816db23b992b3d8e7831/examples/custom-server-actionhero/dump.rdb
--------------------------------------------------------------------------------
/examples/custom-server-actionhero/pages/a.js:
--------------------------------------------------------------------------------
1 | export default () => a
2 |
--------------------------------------------------------------------------------
/examples/custom-server-actionhero/pages/b.js:
--------------------------------------------------------------------------------
1 | export default () => b
2 |
--------------------------------------------------------------------------------
/examples/custom-server-actionhero/pages/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Link from 'next/link'
3 |
4 | export default () => (
5 |
9 | )
10 |
--------------------------------------------------------------------------------
/examples/custom-server-express/pages/a.js:
--------------------------------------------------------------------------------
1 | export default () => a
2 |
--------------------------------------------------------------------------------
/examples/custom-server-express/pages/b.js:
--------------------------------------------------------------------------------
1 | export default () => b
2 |
--------------------------------------------------------------------------------
/examples/custom-server-fastify/pages/a.js:
--------------------------------------------------------------------------------
1 | export default () => a
2 |
--------------------------------------------------------------------------------
/examples/custom-server-fastify/pages/b.js:
--------------------------------------------------------------------------------
1 | export default () => b
2 |
--------------------------------------------------------------------------------
/examples/custom-server-fastify/pages/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Link from 'next/link'
3 |
4 | export default () => (
5 |
9 | )
10 |
--------------------------------------------------------------------------------
/examples/custom-server-hapi/pages/a.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | export default () => a
4 |
--------------------------------------------------------------------------------
/examples/custom-server-hapi/pages/b.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | export default () => b
4 |
--------------------------------------------------------------------------------
/examples/custom-server-hapi/pages/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Link from 'next/link'
3 |
4 | export default () => (
5 |
9 | )
10 |
--------------------------------------------------------------------------------
/examples/custom-server-koa/pages/a.js:
--------------------------------------------------------------------------------
1 | export default () => a
2 |
--------------------------------------------------------------------------------
/examples/custom-server-koa/pages/b.js:
--------------------------------------------------------------------------------
1 | export default () => b
2 |
--------------------------------------------------------------------------------
/examples/custom-server-koa/pages/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Link from 'next/link'
3 |
4 | export default () => (
5 |
9 | )
10 |
--------------------------------------------------------------------------------
/examples/custom-server-micro/pages/a.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | export default () => a
4 |
--------------------------------------------------------------------------------
/examples/custom-server-micro/pages/b.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | export default () => b
4 |
--------------------------------------------------------------------------------
/examples/custom-server-micro/pages/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Link from 'next/link'
3 |
4 | export default () => (
5 |
9 | )
10 |
--------------------------------------------------------------------------------
/examples/custom-server-nodemon/nodemon.json:
--------------------------------------------------------------------------------
1 | {
2 | "watch": ["server/**/*.js"]
3 | }
4 |
--------------------------------------------------------------------------------
/examples/custom-server-nodemon/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "scripts": {
3 | "dev": "nodemon server/index.js",
4 | "build": "next build",
5 | "start": "NODE_ENV=production node server/index.js"
6 | },
7 | "dependencies": {
8 | "next": "latest",
9 | "react": "^16.2.0",
10 | "react-dom": "^16.2.0"
11 | },
12 | "devDependencies": {
13 | "nodemon": "^1.12.1"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/examples/custom-server-nodemon/pages/a.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | export default () => a
4 |
--------------------------------------------------------------------------------
/examples/custom-server-nodemon/pages/b.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | export default () => b
4 |
--------------------------------------------------------------------------------
/examples/custom-server-nodemon/pages/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Link from 'next/link'
3 |
4 | export default () => (
5 |
9 | )
10 |
--------------------------------------------------------------------------------
/examples/custom-server-polka/pages/a.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | export default () => a
4 |
--------------------------------------------------------------------------------
/examples/custom-server-polka/pages/b.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | export default () => b
4 |
--------------------------------------------------------------------------------
/examples/custom-server-polka/pages/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Link from 'next/link'
3 |
4 | export default () => (
5 |
6 |
7 |
8 | a
9 |
10 |
11 |
12 |
13 | b
14 |
15 |
16 |
17 | )
18 |
--------------------------------------------------------------------------------
/examples/custom-server-typescript/next.config.js:
--------------------------------------------------------------------------------
1 | const withTypescript = require('@zeit/next-typescript')
2 | module.exports = withTypescript()
3 |
--------------------------------------------------------------------------------
/examples/custom-server-typescript/nodemon.json:
--------------------------------------------------------------------------------
1 | {
2 | "watch": ["server/**/*.ts"],
3 | "execMap": {
4 | "ts": "ts-node --typeCheck --compilerOptions '{\"module\":\"commonjs\"}'"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/examples/custom-server-typescript/pages/a.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | export default () => a
4 |
--------------------------------------------------------------------------------
/examples/custom-server-typescript/pages/b.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | export default () => b
4 |
--------------------------------------------------------------------------------
/examples/custom-server-typescript/pages/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Link from 'next/link'
3 |
4 | export default () => (
5 |
9 | )
10 |
--------------------------------------------------------------------------------
/examples/custom-server-typescript/tsconfig.server.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "module": "commonjs",
5 | "outDir": ".next/production-server/"
6 | },
7 | "include": ["server/**/*.ts"]
8 | }
9 |
--------------------------------------------------------------------------------
/examples/custom-server/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "custom-server",
3 | "version": "1.0.0",
4 | "scripts": {
5 | "dev": "node server.js",
6 | "build": "next build",
7 | "start": "NODE_ENV=production node server.js"
8 | },
9 | "dependencies": {
10 | "next": "latest",
11 | "react": "^16.0.0",
12 | "react-dom": "^16.0.0"
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/examples/custom-server/pages/a.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | export default () => a
4 |
--------------------------------------------------------------------------------
/examples/custom-server/pages/b.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | export default () => b
4 |
--------------------------------------------------------------------------------
/examples/custom-server/pages/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Link from 'next/link'
3 |
4 | export default () => (
5 |
9 | )
10 |
--------------------------------------------------------------------------------
/examples/data-fetch/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "data-fetch",
3 | "version": "1.0.0",
4 | "scripts": {
5 | "dev": "next",
6 | "build": "next build",
7 | "start": "next start"
8 | },
9 | "dependencies": {
10 | "isomorphic-unfetch": "^2.0.0",
11 | "next": "latest",
12 | "react": "^16.0.0",
13 | "react-dom": "^16.0.0"
14 | },
15 | "license": "ISC"
16 | }
17 |
--------------------------------------------------------------------------------
/examples/form-handler/actions/formActionsCreators.js:
--------------------------------------------------------------------------------
1 | import { INPUT_VALUE } from '../constants'
2 |
3 | export const inputChange = (title, name, val) => dispatch => {
4 | return dispatch({type: INPUT_VALUE, title, name, val})
5 | }
6 |
--------------------------------------------------------------------------------
/examples/form-handler/actions/index.js:
--------------------------------------------------------------------------------
1 | export * from './formActionsCreators'
2 |
--------------------------------------------------------------------------------
/examples/form-handler/constants/index.js:
--------------------------------------------------------------------------------
1 | export const INPUT_VALUE = 'INPUT_VALUE'
2 |
--------------------------------------------------------------------------------
/examples/form-handler/pages/index.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react'
2 | import withRedux from 'next-redux-wrapper'
3 |
4 | import Main from '../components'
5 |
6 | import { initStore } from '../store'
7 |
8 | class Index extends Component {
9 | render () {
10 | return
11 | }
12 | }
13 |
14 | export default withRedux(initStore, null)(Index)
15 |
--------------------------------------------------------------------------------
/examples/form-handler/reducers/index.js:
--------------------------------------------------------------------------------
1 | import { combineReducers } from 'redux'
2 | import formReducer from './formReducer'
3 |
4 | export default combineReducers({
5 | formReducer
6 | })
7 |
--------------------------------------------------------------------------------
/examples/form-handler/store.js:
--------------------------------------------------------------------------------
1 | import { createStore, applyMiddleware } from 'redux'
2 | import thunkMiddleware from 'redux-thunk'
3 | import reducer from './reducers'
4 |
5 | export const initStore = (initialState = {}) => {
6 | return createStore(reducer, initialState, applyMiddleware(thunkMiddleware))
7 | }
8 |
--------------------------------------------------------------------------------
/examples/gh-pages/.babelrc.js:
--------------------------------------------------------------------------------
1 | const env = require('./env-config')
2 |
3 | module.exports = {
4 | 'presets': [
5 | 'next/babel'
6 | ],
7 | 'plugins': [
8 | ['transform-define', env]
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/examples/gh-pages/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .next
3 |
--------------------------------------------------------------------------------
/examples/gh-pages/env-config.js:
--------------------------------------------------------------------------------
1 | const prod = process.env.NODE_ENV === 'production'
2 |
3 | module.exports = {
4 | 'process.env.BACKEND_URL': prod ? '/Next-gh-page-example' : ''
5 | }
6 |
--------------------------------------------------------------------------------
/examples/gh-pages/pages/about.js:
--------------------------------------------------------------------------------
1 | import Link from 'next/link'
2 | export default () => (
3 |
7 | )
8 |
--------------------------------------------------------------------------------
/examples/gh-pages/pages/index.js:
--------------------------------------------------------------------------------
1 | import Link from 'next/link'
2 | export default () => (
3 |
4 | )
5 |
--------------------------------------------------------------------------------
/examples/head-elements/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "head-elements",
3 | "version": "1.0.0",
4 | "scripts": {
5 | "dev": "next",
6 | "build": "next build",
7 | "start": "next start"
8 | },
9 | "dependencies": {
10 | "next": "latest",
11 | "react": "^16.0.0",
12 | "react-dom": "^16.0.0"
13 | },
14 | "license": "ISC"
15 | }
16 |
--------------------------------------------------------------------------------
/examples/head-elements/pages/index.js:
--------------------------------------------------------------------------------
1 | import Head from 'next/head'
2 |
3 | export default () => (
4 |
5 |
6 |
This page has a title 🤔
7 |
8 |
9 |
10 |
11 | This page has a title 🤔
12 |
13 | )
14 |
--------------------------------------------------------------------------------
/examples/hello-world/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "hello-world",
3 | "version": "1.0.0",
4 | "scripts": {
5 | "dev": "next",
6 | "build": "next build",
7 | "start": "next start"
8 | },
9 | "dependencies": {
10 | "next": "latest",
11 | "react": "^16.0.0",
12 | "react-dom": "^16.0.0"
13 | },
14 | "license": "ISC"
15 | }
16 |
--------------------------------------------------------------------------------
/examples/hello-world/pages/about.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 | About us
3 | )
4 |
--------------------------------------------------------------------------------
/examples/hello-world/pages/day/index.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 | Hello Day
3 | )
4 |
--------------------------------------------------------------------------------
/examples/hello-world/pages/index.js:
--------------------------------------------------------------------------------
1 | import Link from 'next/link'
2 | export default () => (
3 |
4 | )
5 |
--------------------------------------------------------------------------------
/examples/layout-component/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "layout-component",
3 | "version": "1.0.0",
4 | "scripts": {
5 | "dev": "next",
6 | "build": "next build",
7 | "start": "next start"
8 | },
9 | "dependencies": {
10 | "next": "latest",
11 | "react": "^16.0.0",
12 | "react-dom": "^16.0.0"
13 | },
14 | "license": "ISC"
15 | }
16 |
--------------------------------------------------------------------------------
/examples/layout-component/pages/about.js:
--------------------------------------------------------------------------------
1 | import Layout from '../components/layout'
2 |
3 | export default () => (
4 |
5 | About us
6 |
7 | )
8 |
--------------------------------------------------------------------------------
/examples/layout-component/pages/contact.js:
--------------------------------------------------------------------------------
1 | import Layout from '../components/layout'
2 |
3 | export default () => (
4 |
5 | Contact
6 |
7 | )
8 |
--------------------------------------------------------------------------------
/examples/layout-component/pages/index.js:
--------------------------------------------------------------------------------
1 | import Layout from '../components/layout'
2 |
3 | export default () => (
4 |
5 | Hello World.
6 |
7 | )
8 |
--------------------------------------------------------------------------------
/examples/nested-components/components/paragraph.js:
--------------------------------------------------------------------------------
1 | export default ({ children }) => (
2 |
3 | {children}
4 |
10 |
11 | )
12 |
--------------------------------------------------------------------------------
/examples/nested-components/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "nested-components",
3 | "version": "1.0.0",
4 | "scripts": {
5 | "dev": "next",
6 | "build": "next build",
7 | "start": "next start"
8 | },
9 | "dependencies": {
10 | "next": "latest",
11 | "react": "^16.0.0",
12 | "react-dom": "^16.0.0"
13 | },
14 | "license": "ISC"
15 | }
16 |
--------------------------------------------------------------------------------
/examples/page-transitions/README.md:
--------------------------------------------------------------------------------
1 | This example has been deprecated and removed in favor of https://github.com/zeit/next.js/tree/canary/examples/with-next-page-transitions
2 |
--------------------------------------------------------------------------------
/examples/pass-server-data/data/item.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Now",
3 | "subtitle": "Realtime global deployments",
4 | "seller": "Zeit"
5 | }
6 |
--------------------------------------------------------------------------------
/examples/pass-server-data/pages/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Link from 'next/link'
3 |
4 | export default () => (
5 |
8 | )
9 |
--------------------------------------------------------------------------------
/examples/progressive-render/components/Loading.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | export default () => (
4 |
5 |
Loading...
6 |
14 |
15 | )
16 |
--------------------------------------------------------------------------------
/examples/progressive-render/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "progressive-render",
3 | "version": "1.0.0",
4 | "scripts": {
5 | "dev": "next",
6 | "build": "next build",
7 | "start": "next start"
8 | },
9 | "dependencies": {
10 | "next": "latest",
11 | "react": "^16.0.0",
12 | "react-dom": "^16.0.0",
13 | "react-no-ssr": "1.1.0"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/examples/root-static-files/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "root-static-files",
3 | "version": "1.0.0",
4 | "scripts": {
5 | "dev": "node server.js",
6 | "build": "next build",
7 | "start": "NODE_ENV=production node server.js"
8 | },
9 | "dependencies": {
10 | "next": "latest",
11 | "react": "^16.0.0",
12 | "react-dom": "^16.0.0"
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/examples/root-static-files/pages/index.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 |
7 | )
8 |
--------------------------------------------------------------------------------
/examples/root-static-files/static/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oddcommit/Next-All-App/ae33f3f6a81ae352236b816db23b992b3d8e7831/examples/root-static-files/static/favicon.ico
--------------------------------------------------------------------------------
/examples/root-static-files/static/robots.txt:
--------------------------------------------------------------------------------
1 | User-agent: *
2 | Disallow: /
3 |
--------------------------------------------------------------------------------
/examples/root-static-files/static/sitemap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | http://www.example.com/foo.html
5 |
6 |
7 |
--------------------------------------------------------------------------------
/examples/shared-modules/components/Header.js:
--------------------------------------------------------------------------------
1 | import Link from 'next/link'
2 |
3 | export default () => (
4 |
5 |
6 |
Home
7 |
8 |
9 |
10 |
About
11 |
12 |
13 | )
14 |
15 | const styles = {
16 | a: {
17 | marginRight: 10
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/examples/shared-modules/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "shared-modules",
3 | "version": "1.0.0",
4 | "scripts": {
5 | "dev": "next",
6 | "build": "next build",
7 | "start": "next start"
8 | },
9 | "dependencies": {
10 | "next": "latest",
11 | "react": "^16.0.0",
12 | "react-dom": "^16.0.0"
13 | },
14 | "license": "ISC"
15 | }
16 |
--------------------------------------------------------------------------------
/examples/shared-modules/pages/about.js:
--------------------------------------------------------------------------------
1 | import Header from '../components/Header'
2 | import Counter from '../components/Counter'
3 |
4 | export default () => (
5 |
6 |
7 |
This is the about page.
8 |
9 |
10 | )
11 |
--------------------------------------------------------------------------------
/examples/shared-modules/pages/index.js:
--------------------------------------------------------------------------------
1 | import Header from '../components/Header'
2 | import Counter from '../components/Counter'
3 |
4 | export default () => (
5 |
6 |
7 |
HOME PAGE is here!
8 |
9 |
10 | )
11 |
--------------------------------------------------------------------------------
/examples/svg-components/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [ "next/babel" ],
3 | "plugins": [ "inline-react-svg" ]
4 | }
5 |
--------------------------------------------------------------------------------
/examples/svg-components/pages/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Cat from '../svgs/cat.svg'
3 |
4 | export default () => (
5 |
6 | SVG Cat!
7 |
8 |
14 |
15 | )
16 |
--------------------------------------------------------------------------------
/examples/using-inferno/pages/about.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | export default () => (
4 | About us
5 | )
6 |
--------------------------------------------------------------------------------
/examples/using-inferno/pages/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Link from 'next/link'
3 |
4 | export default () => (
5 |
6 | )
7 |
--------------------------------------------------------------------------------
/examples/using-nerv/pages/about.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | export default () => (
4 | About us
5 | )
6 |
--------------------------------------------------------------------------------
/examples/using-nerv/pages/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Link from 'next/link'
3 |
4 | export default () => (
5 |
6 | )
7 |
--------------------------------------------------------------------------------
/examples/using-preact/next.config.js:
--------------------------------------------------------------------------------
1 | const withPreact = require('@zeit/next-preact')
2 |
3 | module.exports = withPreact()
4 |
--------------------------------------------------------------------------------
/examples/using-preact/pages/about.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | export default () => (
4 | About us
5 | )
6 |
--------------------------------------------------------------------------------
/examples/using-preact/pages/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Link from 'next/link'
3 |
4 | export default () => (
5 |
6 | )
7 |
--------------------------------------------------------------------------------
/examples/using-router/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "using-router",
3 | "version": "1.0.0",
4 | "scripts": {
5 | "dev": "next",
6 | "build": "next build",
7 | "start": "next start"
8 | },
9 | "dependencies": {
10 | "next": "latest",
11 | "react": "^16.0.0",
12 | "react-dom": "^16.0.0"
13 | },
14 | "license": "ISC"
15 | }
16 |
--------------------------------------------------------------------------------
/examples/using-router/pages/about.js:
--------------------------------------------------------------------------------
1 | import Header from '../components/Header'
2 |
3 | export default () => (
4 |
5 |
6 |
This is the about page.
7 |
8 | )
9 |
--------------------------------------------------------------------------------
/examples/using-router/pages/index.js:
--------------------------------------------------------------------------------
1 | import Header from '../components/Header'
2 |
3 | export default () => (
4 |
5 |
6 |
HOME PAGE is here!
7 |
8 | )
9 |
--------------------------------------------------------------------------------
/examples/using-with-router/components/Header.js:
--------------------------------------------------------------------------------
1 | import ActiveLink from './ActiveLink'
2 |
3 | export default () => (
4 |
5 |
Home
6 |
About
7 |
Error
8 |
9 | )
10 |
--------------------------------------------------------------------------------
/examples/using-with-router/pages/about.js:
--------------------------------------------------------------------------------
1 | import Header from '../components/Header'
2 |
3 | export default () => (
4 |
5 |
6 |
This is the about page.
7 |
8 | )
9 |
--------------------------------------------------------------------------------
/examples/using-with-router/pages/index.js:
--------------------------------------------------------------------------------
1 | import Header from '../components/Header'
2 |
3 | export default () => (
4 |
5 |
6 |
HOME PAGE is here!
7 |
8 | )
9 |
--------------------------------------------------------------------------------
/examples/with-absolute-imports/components/header.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 |
5 | )
6 |
--------------------------------------------------------------------------------
/examples/with-absolute-imports/next.config.js:
--------------------------------------------------------------------------------
1 | const path = require('path')
2 |
3 | module.exports = {
4 | webpack (config, options) {
5 | config.resolve.alias['components'] = path.join(__dirname, 'components')
6 | return config
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/examples/with-absolute-imports/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "scripts": {
3 | "dev": "next",
4 | "build": "next build",
5 | "start": "next start"
6 | },
7 | "dependencies": {
8 | "next": "latest",
9 | "react": "^16.1.1",
10 | "react-dom": "^16.1.1"
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/examples/with-absolute-imports/pages/index.js:
--------------------------------------------------------------------------------
1 | import Header from 'components/header.js'
2 |
3 | export default () => (
4 |
5 |
6 |
7 | )
8 |
--------------------------------------------------------------------------------
/examples/with-algolia-react-instantsearch/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | node_modules
5 |
6 | # testing
7 | /coverage
8 |
9 | # production
10 | /build
11 | /dist
12 | /.next
13 |
14 | # misc
15 | .DS_Store
16 | .env
17 | npm-debug.log*
18 | yarn-debug.log*
19 | yarn-error.log*
20 |
--------------------------------------------------------------------------------
/examples/with-algolia-react-instantsearch/components/index.js:
--------------------------------------------------------------------------------
1 | export * from './head'
2 | export { default as App } from './app'
3 | export { findResultsState } from './instantsearch'
4 |
--------------------------------------------------------------------------------
/examples/with-algolia-react-instantsearch/components/instantsearch.js:
--------------------------------------------------------------------------------
1 | import { createInstantSearch } from 'react-instantsearch/server'
2 |
3 | const { InstantSearch, findResultsState } = createInstantSearch()
4 |
5 | export { InstantSearch, findResultsState }
6 |
--------------------------------------------------------------------------------
/examples/with-algolia-react-instantsearch/static/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oddcommit/Next-All-App/ae33f3f6a81ae352236b816db23b992b3d8e7831/examples/with-algolia-react-instantsearch/static/favicon.ico
--------------------------------------------------------------------------------
/examples/with-amp/components/Byline.js:
--------------------------------------------------------------------------------
1 | export default ({ author }) => (
2 |
3 | By {author}
4 |
5 | )
6 |
--------------------------------------------------------------------------------
/examples/with-amp/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "with-amp",
3 | "version": "1.0.0",
4 | "scripts": {
5 | "dev": "next",
6 | "build": "next build",
7 | "start": "next start"
8 | },
9 | "dependencies": {
10 | "next": "latest",
11 | "react": "^16.0.0",
12 | "react-dom": "^16.0.0"
13 | },
14 | "license": "ISC"
15 | }
16 |
--------------------------------------------------------------------------------
/examples/with-amp/static/cat.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oddcommit/Next-All-App/ae33f3f6a81ae352236b816db23b992b3d8e7831/examples/with-amp/static/cat.jpg
--------------------------------------------------------------------------------
/examples/with-amp/static/dog.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oddcommit/Next-All-App/ae33f3f6a81ae352236b816db23b992b3d8e7831/examples/with-amp/static/dog.jpg
--------------------------------------------------------------------------------
/examples/with-ant-design-less/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["next/babel"],
3 | "plugins": [
4 | ["@babel/plugin-proposal-decorators", { "decoratorsBeforeExport": true }],
5 | [
6 | "import", {
7 | "libraryName": "antd",
8 | "style": true
9 | }
10 | ]
11 | ]
12 | }
13 |
--------------------------------------------------------------------------------
/examples/with-ant-design-less/assets/antd-custom.less:
--------------------------------------------------------------------------------
1 | @primary-color: #52c41a;
2 |
3 | @layout-header-height: 40px;
4 | @border-radius-base: 2px;
5 |
--------------------------------------------------------------------------------
/examples/with-ant-design/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["next/babel"],
3 | "plugins": [
4 | [
5 | "import",
6 | {
7 | "libraryName": "antd",
8 | "style": "css"
9 | }
10 | ]
11 | ]
12 | }
13 |
--------------------------------------------------------------------------------
/examples/with-ant-design/next.config.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | const withCss = require('@zeit/next-css')
3 |
4 | // fix: prevents error when .css files are required by node
5 | if (typeof require !== 'undefined') {
6 | require.extensions['.css'] = (file) => {}
7 | }
8 |
9 | module.exports = withCss()
10 |
--------------------------------------------------------------------------------
/examples/with-antd-mobile/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["next/babel"],
3 | "plugins": [
4 | ["import", {
5 | "libraryName": "antd-mobile",
6 | "style": "css"
7 | }]
8 | ]
9 | }
10 |
--------------------------------------------------------------------------------
/examples/with-antd-mobile/next.config.js:
--------------------------------------------------------------------------------
1 | const withCSS = require('@zeit/next-css')
2 |
3 | // fix: prevents error when .css files are required by node
4 | if (typeof require !== 'undefined') {
5 | // eslint-disable-next-line
6 | require.extensions['.css'] = (file) => {}
7 | }
8 |
9 | module.exports = withCSS()
10 |
--------------------------------------------------------------------------------
/examples/with-antd-mobile/pages/about.js:
--------------------------------------------------------------------------------
1 | import Layout from '../components/Layout'
2 | import { Button } from 'antd-mobile'
3 | import Link from 'next/link'
4 |
5 | export default () => (
6 |
7 |
8 | Go to Index
9 |
10 |
11 | )
12 |
--------------------------------------------------------------------------------
/examples/with-antd-mobile/pages/index.js:
--------------------------------------------------------------------------------
1 | import Layout from '../components/Layout'
2 | import { Button } from 'antd-mobile'
3 | import Link from 'next/link'
4 |
5 | export default () => (
6 |
7 |
8 | Go to About
9 |
10 |
11 | )
12 |
--------------------------------------------------------------------------------
/examples/with-apollo-and-redux-saga/components/ErrorMessage.js:
--------------------------------------------------------------------------------
1 | export default ({message}) => (
2 |
13 | )
14 |
--------------------------------------------------------------------------------
/examples/with-apollo-and-redux-saga/components/PostVoteCount.js:
--------------------------------------------------------------------------------
1 | export default ({votes}) => (
2 |
3 | {votes}
4 |
11 |
12 | )
13 |
--------------------------------------------------------------------------------
/examples/with-apollo-and-redux-saga/lib/count/actions.js:
--------------------------------------------------------------------------------
1 | export const actionTypes = {
2 | COUNT_INCREASE: 'COUNT_INCREASE',
3 | COUNT_DECREASE: 'COUNT_DECREASE'
4 | }
5 |
6 | export function countIncrease () {
7 | return { type: actionTypes.COUNT_INCREASE }
8 | }
9 |
10 | export function countDecrease () {
11 | return { type: actionTypes.COUNT_DECREASE }
12 | }
13 |
--------------------------------------------------------------------------------
/examples/with-apollo-and-redux-saga/lib/rootReducer.js:
--------------------------------------------------------------------------------
1 | import { combineReducers } from 'redux'
2 |
3 | import clock from './clock/reducers'
4 | import count from './count/reducers'
5 | import placeholder from './placeholder/reducers'
6 |
7 | export default combineReducers({
8 | clock,
9 | count,
10 | placeholder
11 | })
12 |
--------------------------------------------------------------------------------
/examples/with-apollo-and-redux-saga/lib/rootSaga.js:
--------------------------------------------------------------------------------
1 | import { all } from 'redux-saga/effects'
2 |
3 | import clock from './clock/sagas'
4 | import placeholder from './placeholder/sagas'
5 |
6 | function * rootSaga () {
7 | yield all([clock, placeholder])
8 | }
9 |
10 | export default rootSaga
11 |
--------------------------------------------------------------------------------
/examples/with-apollo-and-redux-saga/pages/blog/entry.js:
--------------------------------------------------------------------------------
1 | import withApollo from '../../lib/withApollo'
2 |
3 | import App from '../../components/App'
4 | import Header from '../../components/Header'
5 | import Post from '../../components/Post'
6 |
7 | export default withApollo(() => (
8 |
9 |
10 |
11 |
12 | ))
13 |
--------------------------------------------------------------------------------
/examples/with-apollo-and-redux-saga/routes.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Parameterized Routing with next-route
3 | *
4 | * Benefits: Less code, and easily handles complex url structures
5 | **/
6 | const routes = (module.exports = require('next-routes')())
7 |
8 | routes.add('blog/entry', '/blog/:id')
9 |
--------------------------------------------------------------------------------
/examples/with-apollo-and-redux/components/ErrorMessage.js:
--------------------------------------------------------------------------------
1 | export default ({ message }) => (
2 |
13 | )
14 |
--------------------------------------------------------------------------------
/examples/with-apollo/components/ErrorMessage.js:
--------------------------------------------------------------------------------
1 | export default ({ message }) => (
2 |
13 | )
14 |
--------------------------------------------------------------------------------
/examples/with-apollo/pages/index.js:
--------------------------------------------------------------------------------
1 | import App from '../components/App'
2 | import Header from '../components/Header'
3 | import Submit from '../components/Submit'
4 | import PostList from '../components/PostList'
5 |
6 | export default () => (
7 |
8 |
9 |
10 |
11 |
12 | )
13 |
--------------------------------------------------------------------------------
/examples/with-app-layout/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "with-app-layout",
3 | "version": "1.0.0",
4 | "scripts": {
5 | "dev": "next",
6 | "build": "next build",
7 | "start": "next start"
8 | },
9 | "dependencies": {
10 | "next": "6.0.0-canary.6",
11 | "react": "^16.0.0",
12 | "react-dom": "^16.0.0"
13 | },
14 | "license": "ISC"
15 | }
16 |
--------------------------------------------------------------------------------
/examples/with-app-layout/pages/index.js:
--------------------------------------------------------------------------------
1 | export default () => {
2 | return test
3 | }
4 |
--------------------------------------------------------------------------------
/examples/with-asset-imports/next.config.js:
--------------------------------------------------------------------------------
1 | const withImages = require('next-images')
2 | module.exports = withImages()
3 |
--------------------------------------------------------------------------------
/examples/with-asset-imports/pages/index.js:
--------------------------------------------------------------------------------
1 | import avatar from '../static/logo.png'
2 |
3 | export default () =>
4 |
5 |
--------------------------------------------------------------------------------
/examples/with-asset-imports/static/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oddcommit/Next-All-App/ae33f3f6a81ae352236b816db23b992b3d8e7831/examples/with-asset-imports/static/logo.png
--------------------------------------------------------------------------------
/examples/with-babel-macros/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["next/babel"],
3 | "plugins": ["babel-plugin-macros"]
4 | }
5 |
--------------------------------------------------------------------------------
/examples/with-carbon-components/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/*
2 | .next/*
3 |
--------------------------------------------------------------------------------
/examples/with-carbon-components/static/myCustomTheme.scss:
--------------------------------------------------------------------------------
1 | @import './export.scss';
2 |
3 | @import '../node_modules/carbon-components/scss/globals/scss/styles.scss';
4 |
--------------------------------------------------------------------------------
/examples/with-cerebral/modules/clock/actions.js:
--------------------------------------------------------------------------------
1 | export function startTimer ({clock}) {
2 | clock.start('clock.secondTicked')
3 | }
4 |
5 | export function stopTimer ({clock}) {
6 | clock.stop()
7 | }
8 |
--------------------------------------------------------------------------------
/examples/with-cerebral/modules/clock/index.js:
--------------------------------------------------------------------------------
1 |
2 | import {mounted, unMounted, secondTicked} from './signals'
3 | import provider from './provider'
4 |
5 | export default {
6 | state: {
7 | lastUpdate: 0,
8 | light: false
9 | },
10 | signals: {
11 | mounted,
12 | unMounted,
13 | secondTicked
14 | },
15 | provider
16 | }
17 |
--------------------------------------------------------------------------------
/examples/with-cerebral/modules/clock/signals.js:
--------------------------------------------------------------------------------
1 | import {set} from 'cerebral/operators'
2 | import {state, props} from 'cerebral/tags'
3 | import {startTimer, stopTimer} from './actions'
4 |
5 | export const mounted = [
6 | startTimer,
7 | set(state`clock.light`, true)
8 | ]
9 | export const unMounted = stopTimer
10 | export const secondTicked = set(state`clock.lastUpdate`, props`now`)
11 |
--------------------------------------------------------------------------------
/examples/with-cloud9/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "with-cloud9",
3 | "version": "1.0.0",
4 | "scripts": {
5 | "dev": "node server.js",
6 | "build": "next build",
7 | "start": "NODE_ENV=production node server.js"
8 | },
9 | "license": "ISC",
10 | "dependencies": {
11 | "next": "^7.0.2",
12 | "react": "^16.5.2",
13 | "react-dom": "^16.5.2"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/examples/with-cloud9/pages/index.js:
--------------------------------------------------------------------------------
1 | export default () => 'If everything works, you should be able to see me.'
2 |
--------------------------------------------------------------------------------
/examples/with-componentdidcatch/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "with-componentdidcatch",
3 | "version": "1.0.0",
4 | "scripts": {
5 | "dev": "next",
6 | "build": "next build",
7 | "start": "next start"
8 | },
9 | "dependencies": {
10 | "next": "latest",
11 | "react": "^16.0.0",
12 | "react-dom": "^16.0.0"
13 | },
14 | "license": "ISC"
15 | }
16 |
--------------------------------------------------------------------------------
/examples/with-componentdidcatch/pages/_app.js:
--------------------------------------------------------------------------------
1 | import App from 'next/app'
2 |
3 | export default class MyApp extends App {
4 | componentDidCatch (error, errorInfo) {
5 | console.log('CUSTOM ERROR HANDLING', error)
6 | // This is needed to render errors correctly in development / production
7 | super.componentDidCatch(error, errorInfo)
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/examples/with-configured-preset-env/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "scripts": {
3 | "dev": "next",
4 | "build": "next build",
5 | "start": "next start"
6 | },
7 | "dependencies": {
8 | "next": "latest",
9 | "react": "^16.0.0",
10 | "react-dom": "^16.0.0"
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/examples/with-context-api/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "with-context-api",
3 | "version": "1.0.0",
4 | "scripts": {
5 | "dev": "next",
6 | "build": "next build",
7 | "start": "next start"
8 | },
9 | "dependencies": {
10 | "next": "^7.0.0-canary.16",
11 | "react": "^16.0.0",
12 | "react-dom": "^16.0.0"
13 | },
14 | "license": "ISC"
15 | }
16 |
--------------------------------------------------------------------------------
/examples/with-custom-babel-config/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | "next/babel"
4 | ],
5 | "plugins": [
6 | "@babel/plugin-proposal-do-expressions"
7 | ]
8 | }
9 |
--------------------------------------------------------------------------------
/examples/with-custom-reverse-proxy/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | "next/babel"
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/examples/with-custom-reverse-proxy/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "standard"
3 | }
--------------------------------------------------------------------------------
/examples/with-cxs/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "with-cxs",
3 | "version": "1.0.0",
4 | "scripts": {
5 | "dev": "next",
6 | "build": "next build",
7 | "start": "next start"
8 | },
9 | "dependencies": {
10 | "cxs": "^3.0.0",
11 | "next": "latest",
12 | "react": "^16.0.0",
13 | "react-dom": "^16.0.0"
14 | },
15 | "author": "",
16 | "license": "ISC"
17 | }
18 |
--------------------------------------------------------------------------------
/examples/with-data-prefetch/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "scripts": {
3 | "dev": "next",
4 | "build": "next build",
5 | "start": "next start"
6 | },
7 | "dependencies": {
8 | "isomorphic-unfetch": "^2.0.0",
9 | "next": "latest",
10 | "prop-types": "^15.6.0",
11 | "prop-types-exact": "^1.1.1",
12 | "react": "^16.2.0",
13 | "react-dom": "^16.2.0"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/examples/with-docker/.dockerignore:
--------------------------------------------------------------------------------
1 | .next/
2 | node_modules/
3 | Dockerfile
4 |
--------------------------------------------------------------------------------
/examples/with-docker/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM mhart/alpine-node
2 |
3 | WORKDIR /app
4 | COPY . .
5 |
6 | RUN yarn install
7 | RUN yarn build
8 |
9 | EXPOSE 3000
10 | CMD ["yarn", "start"]
11 |
--------------------------------------------------------------------------------
/examples/with-docker/next.config.js:
--------------------------------------------------------------------------------
1 | // next.config.js
2 | module.exports = {
3 | serverRuntimeConfig: { // Will only be available on the server side
4 | mySecret: 'secret'
5 | },
6 | publicRuntimeConfig: { // Will be available on both server and client
7 | API_URL: process.env.API_URL
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/examples/with-dotenv/.env:
--------------------------------------------------------------------------------
1 | TEST=it works!
2 |
--------------------------------------------------------------------------------
/examples/with-dotenv/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "with-dotenv",
3 | "version": "1.0.0",
4 | "scripts": {
5 | "dev": "next",
6 | "build": "next build",
7 | "start": "next start"
8 | },
9 | "dependencies": {
10 | "dotenv-webpack": "1.5.7",
11 | "next": "latest",
12 | "react": "^16.0.0",
13 | "react-dom": "^16.0.0"
14 | },
15 | "license": "ISC"
16 | }
17 |
--------------------------------------------------------------------------------
/examples/with-dotenv/pages/index.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 | { process.env.TEST }
3 | )
4 |
--------------------------------------------------------------------------------
/examples/with-dynamic-app-layout/layouts/BlueLayout.js:
--------------------------------------------------------------------------------
1 | export default ({ children }) => {
2 | return
3 | {children}
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/examples/with-dynamic-app-layout/layouts/GreenLayout.js:
--------------------------------------------------------------------------------
1 | export default ({ children }) => {
2 | return
3 | {children}
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/examples/with-dynamic-app-layout/layouts/RedLayout.js:
--------------------------------------------------------------------------------
1 | export default ({ children }) => {
2 | return
3 | {children}
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/examples/with-dynamic-app-layout/pages/_app.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import App, { Container } from 'next/app'
3 |
4 | export default class MyApp extends App {
5 | render () {
6 | const { Component, pageProps } = this.props
7 | return
8 |
9 |
10 |
11 |
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/examples/with-dynamic-import/components/Header.js:
--------------------------------------------------------------------------------
1 | import Link from 'next/link'
2 |
3 | export default () => (
4 |
5 |
6 |
Home
7 |
8 |
9 |
10 |
About
11 |
12 |
13 | )
14 |
15 | const styles = {
16 | a: {
17 | marginRight: 10
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/examples/with-dynamic-import/components/hello1.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 | Hello World 1 (imported dynamiclly)
3 | )
4 |
--------------------------------------------------------------------------------
/examples/with-dynamic-import/components/hello2.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 | Hello World 2 (imported dynamiclly)
3 | )
4 |
--------------------------------------------------------------------------------
/examples/with-dynamic-import/components/hello3.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 | Hello World 3 (imported dynamiclly)
3 | )
4 |
--------------------------------------------------------------------------------
/examples/with-dynamic-import/components/hello4.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 | Hello World 4 (imported dynamiclly)
3 | )
4 |
--------------------------------------------------------------------------------
/examples/with-dynamic-import/components/hello5.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 | Hello World 5 (imported dynamiclly)
3 | )
4 |
--------------------------------------------------------------------------------
/examples/with-dynamic-import/components/hello6.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 | Hello World 6 (imported dynamiclly)
3 | )
4 |
--------------------------------------------------------------------------------
/examples/with-dynamic-import/components/hello7.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 | Hello World 7 (imported dynamiclly)
3 | )
4 |
--------------------------------------------------------------------------------
/examples/with-dynamic-import/next.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | exportPathMap: function () {
3 | return {
4 | '/': { page: '/', query: { showMore: false } },
5 | '/about': { page: '/about' }
6 | }
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/examples/with-dynamic-import/pages/about.js:
--------------------------------------------------------------------------------
1 | import Header from '../components/Header'
2 | import Counter from '../components/Counter'
3 |
4 | const About = () => (
5 |
6 |
7 |
This is the about page.
8 |
9 |
10 | )
11 |
12 | export default About
13 |
--------------------------------------------------------------------------------
/examples/with-electron/main/preload.js:
--------------------------------------------------------------------------------
1 | const { ipcRenderer } = require('electron')
2 |
3 | // Since we disabled nodeIntegration we can reintroduce
4 | // needed node functionality here
5 | process.once('loaded', () => {
6 | global.ipcRenderer = ipcRenderer
7 | })
8 |
--------------------------------------------------------------------------------
/examples/with-electron/renderer/next.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | exportPathMap () {
3 | // Let Next.js know where to find the entry page
4 | // when it's exporting the static bundle for the use
5 | // in the production version of your app
6 | return {
7 | '/start': { page: '/start' }
8 | }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/examples/with-emotion-fiber/features/home.component.js:
--------------------------------------------------------------------------------
1 | import {Basic, Combined, Animated, bounce} from '../shared/styles'
2 | const Home = () => (
3 |
4 |
Cool Styles
5 |
6 | With :hover
.
7 |
8 |
Let's bounce.
9 |
10 | )
11 |
12 | export default Home
13 |
--------------------------------------------------------------------------------
/examples/with-emotion-fiber/pages/index.js:
--------------------------------------------------------------------------------
1 | import withEmotion from '../hoc/withEmotion.component'
2 | import home from '../features/home.component'
3 |
4 | export default withEmotion(home)
5 |
--------------------------------------------------------------------------------
/examples/with-emotion/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | "next/babel"
4 | ],
5 | "plugins": [
6 | ["emotion"]
7 | ]
8 | }
--------------------------------------------------------------------------------
/examples/with-external-scoped-css/README.md:
--------------------------------------------------------------------------------
1 |
2 | # With external scoped css
3 |
4 | This example has been deprecated in favor of [@zeit/next-css](https://github.com/zeit/next-plugins/tree/master/packages/next-css).
5 |
--------------------------------------------------------------------------------
/examples/with-external-styled-jsx-sass/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "scripts": {
3 | "dev": "next",
4 | "build": "next build",
5 | "start": "next start"
6 | },
7 | "dependencies": {
8 | "next": "latest",
9 | "react": "^16.2.0",
10 | "react-dom": "^16.2.0"
11 | },
12 | "devDependencies": {
13 | "node-sass": "^4.7.2",
14 | "sass-loader": "7.1.0"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/examples/with-external-styled-jsx-sass/pages/index.js:
--------------------------------------------------------------------------------
1 | import styles from '../styles/style.scss'
2 |
3 | export default () =>
4 |
5 | Hello World!
6 |
7 |
8 |
--------------------------------------------------------------------------------
/examples/with-external-styled-jsx-sass/styles/style.scss:
--------------------------------------------------------------------------------
1 | $color: #2ecc71;
2 |
3 | div {
4 | background-color: $color;
5 | :hover {
6 | background-color: darken($color, 20%);
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/examples/with-fela/getFelaRenderer.js:
--------------------------------------------------------------------------------
1 | import { createRenderer } from 'fela'
2 | import webPreset from 'fela-preset-web'
3 |
4 | export default function getRenderer () {
5 | return createRenderer({
6 | plugins: [
7 | ...webPreset
8 | ]
9 | })
10 | }
11 |
--------------------------------------------------------------------------------
/examples/with-firebase-authentication/credentials/client.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | // TODO firebase client config
3 | }
4 |
--------------------------------------------------------------------------------
/examples/with-firebase-authentication/credentials/server.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | // TODO firebase server config
3 | }
4 |
--------------------------------------------------------------------------------
/examples/with-firebase-cloud-messaging/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .next
--------------------------------------------------------------------------------
/examples/with-firebase-cloud-messaging/next.config.js:
--------------------------------------------------------------------------------
1 | const withOffline = require('next-offline')
2 |
3 | const nextConfig = {
4 | // your nextjs config
5 | }
6 | module.exports = withOffline(nextConfig)
7 |
--------------------------------------------------------------------------------
/examples/with-firebase-cloud-messaging/pages/index.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react'
2 | import { firebaseCloudMessaging } from '../utils/webPush'
3 |
4 | class Index extends Component {
5 | componentDidMount () {
6 | firebaseCloudMessaging.init()
7 | }
8 | render () {
9 | return Next.js with firebase cloud messaging.
10 | }
11 | }
12 |
13 | export default Index
14 |
--------------------------------------------------------------------------------
/examples/with-firebase-cloud-messaging/static/firebase-messaging-sw.js:
--------------------------------------------------------------------------------
1 | /* global importScripts, firebase */
2 | importScripts('https://www.gstatic.com/firebasejs/4.8.1/firebase-app.js')
3 | importScripts('https://www.gstatic.com/firebasejs/4.8.1/firebase-messaging.js')
4 |
5 | firebase.initializeApp({
6 | messagingSenderId: 'your sender id'
7 | })
8 |
9 | firebase.messaging()
10 |
--------------------------------------------------------------------------------
/examples/with-firebase-hosting-and-typescript/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | "next/babel",
4 | "@zeit/next-typescript/babel"
5 | ]
6 | }
--------------------------------------------------------------------------------
/examples/with-firebase-hosting-and-typescript/.firebaserc:
--------------------------------------------------------------------------------
1 | {
2 | "projects": {
3 | "default": ""
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/examples/with-firebase-hosting-and-typescript/.gitignore:
--------------------------------------------------------------------------------
1 | dist/
2 |
--------------------------------------------------------------------------------
/examples/with-firebase-hosting-and-typescript/src/app/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["next/babel", "@zeit/next-typescript/babel"]
3 | }
4 |
--------------------------------------------------------------------------------
/examples/with-firebase-hosting-and-typescript/src/app/components/App.tsx:
--------------------------------------------------------------------------------
1 | import Header from './Header';
2 |
3 | const App = ({ children }: { children?: any }) => (
4 |
5 |
6 | {children}
7 |
8 | );
9 |
10 | export default App;
11 |
--------------------------------------------------------------------------------
/examples/with-firebase-hosting-and-typescript/src/app/next.config.js:
--------------------------------------------------------------------------------
1 | const withTypescript = require('@zeit/next-typescript')
2 | module.exports = withTypescript({ distDir: '../../dist/functions/next' })
3 |
--------------------------------------------------------------------------------
/examples/with-firebase-hosting-and-typescript/src/app/pages/about.tsx:
--------------------------------------------------------------------------------
1 | import App from '../components/App';
2 |
3 | export default () => (
4 |
5 | About Page
6 |
7 | );
8 |
--------------------------------------------------------------------------------
/examples/with-firebase-hosting-and-typescript/src/app/pages/index.tsx:
--------------------------------------------------------------------------------
1 | import App from '../components/App';
2 |
3 | export default () => (
4 |
5 | Index Page
6 |
7 | );
8 |
--------------------------------------------------------------------------------
/examples/with-firebase-hosting-and-typescript/src/app/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": ["tslint:latest", "tslint-react"],
3 | "rules": {
4 | "quotemark": [true, "single"],
5 | "no-submodule-imports": false
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/examples/with-firebase-hosting-and-typescript/src/functions/src/index.ts:
--------------------------------------------------------------------------------
1 | import * as functions from 'firebase-functions';
2 |
3 | export { nextApp } from './app/next';
--------------------------------------------------------------------------------
/examples/with-firebase-hosting-and-typescript/src/functions/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "lib": ["es6"],
4 | "module": "commonjs",
5 | "noImplicitReturns": true,
6 | "outDir": "../../dist/functions",
7 | "sourceMap": true,
8 | "target": "es6",
9 | "baseUrl": "./src"
10 | },
11 | "compileOnSave": true,
12 | "include": ["src"]
13 | }
14 |
--------------------------------------------------------------------------------
/examples/with-firebase-hosting-and-typescript/src/public/placeholder.html:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oddcommit/Next-All-App/ae33f3f6a81ae352236b816db23b992b3d8e7831/examples/with-firebase-hosting-and-typescript/src/public/placeholder.html
--------------------------------------------------------------------------------
/examples/with-firebase-hosting/.firebaserc:
--------------------------------------------------------------------------------
1 | {
2 | "projects": {
3 | "default": ""
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/examples/with-firebase-hosting/.gitignore:
--------------------------------------------------------------------------------
1 | dist/
--------------------------------------------------------------------------------
/examples/with-firebase-hosting/firebase.json:
--------------------------------------------------------------------------------
1 | {
2 | "hosting": {
3 | "public": "dist/public",
4 | "rewrites": [
5 | {
6 | "source": "**/**",
7 | "function": "next"
8 | }
9 | ]
10 | },
11 | "functions": {
12 | "source": "dist/functions"
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/examples/with-firebase-hosting/src/app/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [["next/babel"]]
3 | }
4 |
--------------------------------------------------------------------------------
/examples/with-firebase-hosting/src/app/components/App.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Header from './Header'
3 |
4 | const App = ({ children }) => (
5 |
6 |
7 | {children}
8 |
9 | )
10 |
11 | export default App
12 |
--------------------------------------------------------------------------------
/examples/with-firebase-hosting/src/app/next.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | distDir: '../../dist/functions/next'
3 | }
4 |
--------------------------------------------------------------------------------
/examples/with-firebase-hosting/src/app/pages/about.js:
--------------------------------------------------------------------------------
1 | import * as React from 'react'
2 | import App from '../components/App'
3 |
4 | export default () => (
5 |
6 | About Page
7 |
8 | )
9 |
--------------------------------------------------------------------------------
/examples/with-firebase-hosting/src/app/pages/index.js:
--------------------------------------------------------------------------------
1 | import * as React from 'react'
2 | import App from '../components/App'
3 |
4 | export default () => (
5 |
6 | Index Page
7 |
8 | )
9 |
--------------------------------------------------------------------------------
/examples/with-firebase-hosting/src/functions/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | [
4 | "@babel/preset-env",
5 | {
6 | "targets": {
7 | "node": "6.11.5"
8 | }
9 | }
10 | ]
11 | ]
12 | }
--------------------------------------------------------------------------------
/examples/with-firebase-hosting/src/public/placeholder.html:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oddcommit/Next-All-App/ae33f3f6a81ae352236b816db23b992b3d8e7831/examples/with-firebase-hosting/src/public/placeholder.html
--------------------------------------------------------------------------------
/examples/with-flow/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | "next/babel"
4 | ],
5 | "plugins": [
6 | "transform-flow-strip-types"
7 | ]
8 | }
--------------------------------------------------------------------------------
/examples/with-flow/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "parser": "babel-eslint"
3 | }
4 |
--------------------------------------------------------------------------------
/examples/with-flow/.flowconfig:
--------------------------------------------------------------------------------
1 | [ignore]
2 | .*/node_modules/*
3 |
4 | [include]
5 |
6 | [libs]
7 |
8 | [options]
9 |
--------------------------------------------------------------------------------
/examples/with-flow/pages/about.js:
--------------------------------------------------------------------------------
1 | // @flow
2 | import React from 'react'
3 | import Page from '../components/Page'
4 |
5 | export default () => (
6 |
7 | About us
8 |
9 | )
10 |
--------------------------------------------------------------------------------
/examples/with-flow/pages/contact.js:
--------------------------------------------------------------------------------
1 | // @flow
2 | import React from 'react'
3 | import Page from '../components/Page'
4 |
5 | export default () => (
6 |
7 | Contact
8 |
9 | )
10 |
--------------------------------------------------------------------------------
/examples/with-flow/pages/index.js:
--------------------------------------------------------------------------------
1 | // @flow
2 | import React from 'react'
3 | import Page from '../components/Page'
4 |
5 | export default () => (
6 |
7 | Hello World
8 |
9 | )
10 |
--------------------------------------------------------------------------------
/examples/with-flow/with-flow.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oddcommit/Next-All-App/ae33f3f6a81ae352236b816db23b992b3d8e7831/examples/with-flow/with-flow.gif
--------------------------------------------------------------------------------
/examples/with-freactal/githubApi.js:
--------------------------------------------------------------------------------
1 | /* global fetch */
2 | import 'isomorphic-unfetch'
3 |
4 | const API_BASE_URL = 'https://api.github.com'
5 |
6 | export const fetchUserRepos = (username, page = 1) =>
7 | fetch(`${API_BASE_URL}/users/${username}/repos?page=${page}`)
8 | .then(response => response.json())
9 |
--------------------------------------------------------------------------------
/examples/with-glamor/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["next/babel"],
3 | "plugins": [
4 | [
5 | "transform-react-jsx",
6 | { "pragma": "Glamor.createElement" }
7 | ]
8 | ]
9 | }
10 |
--------------------------------------------------------------------------------
/examples/with-global-stylesheet-simple/README.md:
--------------------------------------------------------------------------------
1 | # Global Stylesheet simple example
2 |
3 | This example has been deprecated. Please use [examples/with-next-css](../with-next-css) instead.
4 |
--------------------------------------------------------------------------------
/examples/with-global-stylesheet/README.md:
--------------------------------------------------------------------------------
1 | # Global Stylesheet Example
2 |
3 | This example has been deprecated. Please use [examples/with-next-css](../with-next-css) instead.
4 |
--------------------------------------------------------------------------------
/examples/with-google-analytics/components/Page.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Router from 'next/router'
3 | import Header from './Header'
4 |
5 | import * as gtag from '../lib/gtag'
6 |
7 | Router.events.on('routeChangeComplete', url => gtag.pageview(url))
8 |
9 | export default ({ children }) => (
10 |
11 |
12 | {children}
13 |
14 | )
15 |
--------------------------------------------------------------------------------
/examples/with-google-analytics/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "with-google-analytics",
3 | "scripts": {
4 | "dev": "next",
5 | "build": "next build",
6 | "start": "next start"
7 | },
8 | "dependencies": {
9 | "next": "latest",
10 | "react": "^16.2.0",
11 | "react-dom": "^16.2.0"
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/examples/with-google-analytics/pages/about.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Page from '../components/Page'
3 |
4 | export default () => (
5 |
6 | This is the About page
7 |
8 | )
9 |
--------------------------------------------------------------------------------
/examples/with-google-analytics/pages/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Page from '../components/Page'
3 |
4 | export default () => (
5 |
6 | This is the Home page
7 |
8 | )
9 |
--------------------------------------------------------------------------------
/examples/with-hashed-statics/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "scripts": {
3 | "dev": "next dev",
4 | "build": "next build",
5 | "start": "next"
6 | },
7 | "dependencies": {
8 | "babel-plugin-transform-assets": "^0.2.0",
9 | "next": "latest",
10 | "react": "16.2.0",
11 | "react-dom": "16.2.0"
12 | },
13 | "devDependencies": {
14 | "file-loader": "2.0.0"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/examples/with-hashed-statics/static/file.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oddcommit/Next-All-App/ae33f3f6a81ae352236b816db23b992b3d8e7831/examples/with-hashed-statics/static/file.txt
--------------------------------------------------------------------------------
/examples/with-hashed-statics/static/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oddcommit/Next-All-App/ae33f3f6a81ae352236b816db23b992b3d8e7831/examples/with-hashed-statics/static/images/logo.png
--------------------------------------------------------------------------------
/examples/with-higher-order-component/components/Nav.js:
--------------------------------------------------------------------------------
1 | import Link from 'next/link'
2 |
3 | export const Nav = () => (
4 |
5 |
6 |
7 | Index
8 |
9 |
10 |
11 |
12 | About
13 |
14 |
15 |
16 | )
17 |
--------------------------------------------------------------------------------
/examples/with-higher-order-component/lib/getDisplayName.js:
--------------------------------------------------------------------------------
1 | export function getDisplayName (Component) {
2 | return Component.displayName || Component.name || 'Unknown'
3 | }
4 |
--------------------------------------------------------------------------------
/examples/with-ioc/components/component1.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Component2 from './component2'
3 |
4 | export default () => (
5 |
6 |
Component1
7 | Knows nothing about any custom `Link` or `Router` components or prop
8 |
9 |
10 | )
11 |
--------------------------------------------------------------------------------
/examples/with-ioc/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | setupFiles: ['/jest.setup.js'],
3 | testPathIgnorePatterns: ['/.next/', '/node_modules/']
4 | }
5 |
--------------------------------------------------------------------------------
/examples/with-ioc/jest.setup.js:
--------------------------------------------------------------------------------
1 | import { configure } from 'enzyme'
2 | import Adapter from 'enzyme-adapter-react-16'
3 |
4 | configure({ adapter: new Adapter() })
5 |
--------------------------------------------------------------------------------
/examples/with-ioc/pages/about.js:
--------------------------------------------------------------------------------
1 | export default props => About foo – no `Link` ({typeof props.Link}) available here
2 |
--------------------------------------------------------------------------------
/examples/with-ioc/routes.js:
--------------------------------------------------------------------------------
1 | const nextRoutes = require('next-routes')
2 | const routes = module.exports = nextRoutes()
3 |
4 | routes.add('blog', '/blog/:slug')
5 | routes.add('about', '/about-us/:foo(bar|baz)')
6 |
--------------------------------------------------------------------------------
/examples/with-jest-typescript/jest.setup.js:
--------------------------------------------------------------------------------
1 | const Enzyme = require('enzyme')
2 | const Adapter = require('enzyme-adapter-react-16')
3 |
4 | Enzyme.configure({adapter: new Adapter()})
5 |
--------------------------------------------------------------------------------
/examples/with-jest-typescript/next.config.js:
--------------------------------------------------------------------------------
1 | const withTypescript = require('@zeit/next-typescript')
2 | module.exports = withTypescript()
3 |
--------------------------------------------------------------------------------
/examples/with-jest-typescript/pages/cars.tsx:
--------------------------------------------------------------------------------
1 | import CarsOverview from './../src/modules/cars/Overview';
2 |
3 | const CarsPage = () => ;
4 |
5 | export default CarsPage;
--------------------------------------------------------------------------------
/examples/with-jest-typescript/pages/index.tsx:
--------------------------------------------------------------------------------
1 | const IndexPage = () => Testing Next.js App written in TypeScript with Jest ;
2 |
3 | export default IndexPage;
--------------------------------------------------------------------------------
/examples/with-jest-typescript/pages/login.tsx:
--------------------------------------------------------------------------------
1 | import Login from './../src/modules/auth/Login';
2 |
3 | const LoginPage = () => ;
4 |
5 | export default LoginPage;
--------------------------------------------------------------------------------
/examples/with-jest-typescript/src/modules/auth/types.ts:
--------------------------------------------------------------------------------
1 | export interface LoginCredentials {
2 | email: string;
3 | password: string;
4 | }
--------------------------------------------------------------------------------
/examples/with-jest-typescript/src/modules/cars/types.ts:
--------------------------------------------------------------------------------
1 | export interface Car {
2 | make : string;
3 | model : string;
4 | engine : string;
5 | year : number;
6 | mileage : number;
7 | equipment : string[];
8 | }
9 |
10 | export type CarList = Array < Car >;
--------------------------------------------------------------------------------
/examples/with-jest/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["next/babel"]
3 | }
4 |
--------------------------------------------------------------------------------
/examples/with-jest/__tests__/__snapshots__/index.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`With Snapshot Testing App shows "Hello world!" 1`] = `
4 |
7 |
10 | Hello World!
11 |
12 |
13 | `
14 |
--------------------------------------------------------------------------------
/examples/with-jest/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | setupFiles: ['/jest.setup.js'],
3 | testPathIgnorePatterns: ['/.next/', '/node_modules/']
4 | }
5 |
--------------------------------------------------------------------------------
/examples/with-jest/jest.setup.js:
--------------------------------------------------------------------------------
1 | import { configure } from 'enzyme'
2 | import Adapter from 'enzyme-adapter-react-16'
3 |
4 | configure({ adapter: new Adapter() })
5 |
--------------------------------------------------------------------------------
/examples/with-jest/pages/index.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 |
10 | )
11 |
--------------------------------------------------------------------------------
/examples/with-kea/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | "next/babel"
4 | ],
5 | "plugins": [
6 | ["@babel/plugin-proposal-decorators", { "legacy": true }]
7 | ]
8 | }
9 |
--------------------------------------------------------------------------------
/examples/with-loading/pages/about.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react'
2 |
3 | export default class About extends Component {
4 | // Add some delay
5 | static async getInitialProps () {
6 | await new Promise((resolve) => {
7 | setTimeout(resolve, 500)
8 | })
9 | return {}
10 | }
11 |
12 | render () {
13 | return This is about Next!
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/examples/with-loading/pages/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | export default () => Hello Next!
4 |
--------------------------------------------------------------------------------
/examples/with-markdown/md/markdown.mdx:
--------------------------------------------------------------------------------
1 | import Other from './other.mdx'
2 |
3 | # Hello, world `awesome` :smile_cat:
4 |
5 |
6 |
7 | ```jsx
8 |
9 | ```
10 |
11 | Here's a paragraph
12 |
13 | https://c8r.imgix.net/028ab8c85da415103cb3b1eb/johno.png
14 |
15 | Here's a table
16 |
17 | | Test | Table |
18 | | :--- | :---- |
19 | | Col1 | Col2 |
--------------------------------------------------------------------------------
/examples/with-markdown/md/other.mdx:
--------------------------------------------------------------------------------
1 | ### Other `awesome`
2 |
3 | file
--------------------------------------------------------------------------------
/examples/with-markdown/next.config.js:
--------------------------------------------------------------------------------
1 | const images = require('remark-images')
2 | const emoji = require('remark-emoji')
3 |
4 | const withMDX = require('@zeit/next-mdx')({
5 | options: {
6 | mdPlugins: [
7 | images,
8 | emoji
9 | ]
10 | }
11 | })
12 |
13 | module.exports = withMDX({
14 | pageExtensions: ['js', 'jsx', 'mdx']
15 | })
16 |
--------------------------------------------------------------------------------
/examples/with-markdown/pages/hello.mdx:
--------------------------------------------------------------------------------
1 | # Hello, world! :smiley:
--------------------------------------------------------------------------------
/examples/with-material-ui/README.md:
--------------------------------------------------------------------------------
1 | # Material-UI example
2 |
3 | Source code is hosted on the [Material-UI](https://github.com/mui-org/material-ui/tree/master/examples/nextjs) repository.
4 |
--------------------------------------------------------------------------------
/examples/with-mdx/components/button.js:
--------------------------------------------------------------------------------
1 | export default ({ children }) => (
2 |
10 | {children}
11 |
12 | )
13 |
--------------------------------------------------------------------------------
/examples/with-mdx/next.config.js:
--------------------------------------------------------------------------------
1 | const withMDX = require('@zeit/next-mdx')({
2 | extension: /\.mdx?$/
3 | })
4 | module.exports = withMDX({
5 | pageExtensions: ['js', 'jsx', 'mdx']
6 | })
7 |
--------------------------------------------------------------------------------
/examples/with-mdx/pages/index.mdx:
--------------------------------------------------------------------------------
1 | import Button from '../components/button.js'
2 |
3 | # MDX + Next.js
4 |
5 | Look, a button! 👇
6 |
7 | 👋 Hello
8 |
--------------------------------------------------------------------------------
/examples/with-mobx-state-tree-typescript/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | "next/babel",
4 | "@zeit/next-typescript/babel"
5 | ],
6 | "plugins": [
7 | ["@babel/plugin-proposal-decorators", { "legacy": true }]
8 | ]
9 | }
10 |
--------------------------------------------------------------------------------
/examples/with-mobx-state-tree-typescript/next.config.js:
--------------------------------------------------------------------------------
1 | const withTypescript = require('@zeit/next-typescript')
2 | module.exports = withTypescript()
3 |
--------------------------------------------------------------------------------
/examples/with-mobx-state-tree-typescript/pages/index.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { SampleComponent } from "../components/SampleComponent";
3 |
4 | class IndexPage extends React.Component {
5 | public render() {
6 | return (
7 |
8 | );
9 | }
10 | }
11 |
12 | export default IndexPage;
13 |
--------------------------------------------------------------------------------
/examples/with-mobx-state-tree-typescript/pages/other.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { SampleComponent } from "../components/SampleComponent";
3 |
4 | class OtherPage extends React.Component {
5 | public render() {
6 | return (
7 |
8 | );
9 | }
10 | }
11 |
12 | export default OtherPage;
13 |
--------------------------------------------------------------------------------
/examples/with-mobx-state-tree/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | "next/babel"
4 | ],
5 | "plugins": [
6 | ["@babel/plugin-proposal-decorators", { "legacy": true }]
7 | ]
8 | }
9 |
--------------------------------------------------------------------------------
/examples/with-mobx-state-tree/pages/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import SampleComponent from '../components/SampleComponent'
3 |
4 | export default () => {
5 | return (
6 |
7 | )
8 | }
9 |
--------------------------------------------------------------------------------
/examples/with-mobx-state-tree/pages/other.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import SampleComponent from '../components/SampleComponent'
3 |
4 | export default () => {
5 | return (
6 |
7 | )
8 | }
9 |
--------------------------------------------------------------------------------
/examples/with-mobx/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | "next/babel"
4 | ],
5 | "plugins": [
6 | ["@babel/plugin-proposal-decorators", { "legacy": true }],
7 | ["@babel/plugin-proposal-class-properties", { "loose": true }]
8 | ]
9 | }
10 |
--------------------------------------------------------------------------------
/examples/with-mobx/pages/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Page from '../components/Page'
3 |
4 | export default class Counter extends React.Component {
5 | render () {
6 | return (
7 |
8 | )
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/examples/with-mobx/pages/other.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Page from '../components/Page'
3 |
4 | export default class Counter extends React.Component {
5 | render () {
6 | return (
7 |
8 | )
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/examples/with-mocha/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "env": {
3 | "development": {
4 | "presets": ["next/babel"]
5 | },
6 | "production": {
7 | "presets": ["next/babel"]
8 | },
9 | "test": {
10 | "presets": [["next/babel", { "preset-env": { "modules": "commonjs" } }]]
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/examples/with-mocha/mocha.setup.js:
--------------------------------------------------------------------------------
1 | import Enzyme from 'enzyme'
2 | import Adapter from 'enzyme-adapter-react-16'
3 |
4 | Enzyme.configure({ adapter: new Adapter() })
5 |
--------------------------------------------------------------------------------
/examples/with-mocha/pages/index.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 |
10 | )
11 |
--------------------------------------------------------------------------------
/examples/with-mocha/test/mocha.opts:
--------------------------------------------------------------------------------
1 | --require @babel/register
2 | --file mocha.setup.js
--------------------------------------------------------------------------------
/examples/with-next-css/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "with-css-modules",
3 | "version": "1.0.0",
4 | "main": "index.js",
5 | "scripts": {
6 | "dev": "next",
7 | "build": "next build",
8 | "start": "next start"
9 | },
10 | "dependencies": {
11 | "@zeit/next-css": "^1.0.1",
12 | "next": "latest",
13 | "react": "16.4.2",
14 | "react-dom": "16.4.2"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/examples/with-next-css/pages/index.js:
--------------------------------------------------------------------------------
1 |
2 | /* Without CSS Modules, maybe with PostCSS */
3 |
4 | import '../style.css'
5 |
6 | export default () => O Hai world!
7 |
8 | /* With CSS Modules */
9 | /*
10 | import css from "../style.css"
11 |
12 | export default () => Hello World, I am being styled using CSS Modules!
13 | */
14 |
--------------------------------------------------------------------------------
/examples/with-next-css/style.css:
--------------------------------------------------------------------------------
1 | .example {
2 | font-size: 50px;
3 | color: papayawhip;
4 | }
5 |
6 | /* Post-CSS */
7 | /*
8 | :root {
9 | --some-color: red;
10 | }
11 |
12 | .example {
13 | color: var(--some-color);
14 | }
15 |
16 | */
17 |
--------------------------------------------------------------------------------
/examples/with-next-i18next/README.md:
--------------------------------------------------------------------------------
1 | # with-next-i18next - internationalization using i18next
2 |
3 | The next-i18next module is the simplest way to add internationalization based on i18next to your next.js application providing all the benefits of react-i18next.
4 |
5 | Learn more on [next-i18next](https://github.com/isaachinman/next-i18next).
6 |
--------------------------------------------------------------------------------
/examples/with-next-less/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "scripts": {
3 | "dev": "next",
4 | "build": "next build",
5 | "start": "next start"
6 | },
7 | "dependencies": {
8 | "@zeit/next-less": "^1.0.1",
9 | "less": "^3.0.4",
10 | "next": "latest",
11 | "react": "^16.4.0",
12 | "react-dom": "^16.4.0"
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/examples/with-next-less/pages/index.js:
--------------------------------------------------------------------------------
1 | // Without CSS Modules
2 | import '../style.less'
3 | export default () => Hello Less!
4 |
5 | // With CSS Modules
6 | /*
7 | import style from '../style.less'
8 | export default () => Hello Less!
9 | */
10 |
--------------------------------------------------------------------------------
/examples/with-next-less/style.less:
--------------------------------------------------------------------------------
1 | @theme: red;
2 |
3 | .example {
4 | color: @theme;
5 | }
6 |
--------------------------------------------------------------------------------
/examples/with-next-page-transitions/pages/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Link from 'next/link'
3 |
4 | const Index = () => (
5 |
6 |
Hello, world!
7 |
8 |
About us
9 |
10 |
11 | )
12 |
13 | export default Index
14 |
--------------------------------------------------------------------------------
/examples/with-next-routes/pages/about.js:
--------------------------------------------------------------------------------
1 | import { withRouter } from 'next/router'
2 |
3 | const About = ({router}) => About foo {router.query.foo}
4 |
5 | export default withRouter(About)
6 |
--------------------------------------------------------------------------------
/examples/with-next-routes/routes.js:
--------------------------------------------------------------------------------
1 | const nextRoutes = require('next-routes')
2 | const routes = module.exports = nextRoutes()
3 |
4 | routes.add('blog', '/blog/:slug')
5 | routes.add('about', '/about-us/:foo(bar|baz)')
6 |
--------------------------------------------------------------------------------
/examples/with-next-sass/next.config.js:
--------------------------------------------------------------------------------
1 | const withSass = require('@zeit/next-sass')
2 | module.exports = withSass()
3 |
--------------------------------------------------------------------------------
/examples/with-next-sass/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "scripts": {
3 | "dev": "next",
4 | "build": "next build",
5 | "start": "next start"
6 | },
7 | "dependencies": {
8 | "@zeit/next-sass": "^1.0.0",
9 | "next": "latest",
10 | "node-sass": "^4.7.2",
11 | "react": "^16.2.0",
12 | "react-dom": "^16.2.0"
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/examples/with-next-sass/pages/index.js:
--------------------------------------------------------------------------------
1 | import '../styles/style.scss'
2 |
3 | export default () =>
4 |
5 | Hello World!
6 |
7 |
--------------------------------------------------------------------------------
/examples/with-next-sass/styles/style.scss:
--------------------------------------------------------------------------------
1 | $color: #2ecc71;
2 | .example {
3 | background-color: $color;
4 | }
5 |
--------------------------------------------------------------------------------
/examples/with-noscript/components/Noscript.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import ReactDOMServer from 'react-dom/server'
3 |
4 | export default function Noscript (props) {
5 | const staticMarkup = ReactDOMServer.renderToStaticMarkup(props.children)
6 | return
7 | }
8 |
--------------------------------------------------------------------------------
/examples/with-noscript/next.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | webpack: (config, { dev }) => {
3 | if (!dev) {
4 | config.resolve.alias = {
5 | 'react-dom/server': require.resolve('react-dom/umd/react-dom-server.browser.production.min.js')
6 | }
7 | }
8 | return config
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/examples/with-noscript/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "with-noscript",
3 | "version": "1.0.0",
4 | "scripts": {
5 | "dev": "next",
6 | "build": "next build",
7 | "start": "next start"
8 | },
9 | "dependencies": {
10 | "next": "latest",
11 | "react": "^16.0.0",
12 | "react-dom": "^16.0.0",
13 | "react-lazyload": "^2.2.7"
14 | },
15 | "license": "ISC"
16 | }
17 |
--------------------------------------------------------------------------------
/examples/with-noscript/static/img/angular.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oddcommit/Next-All-App/ae33f3f6a81ae352236b816db23b992b3d8e7831/examples/with-noscript/static/img/angular.jpg
--------------------------------------------------------------------------------
/examples/with-noscript/static/img/nextjs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oddcommit/Next-All-App/ae33f3f6a81ae352236b816db23b992b3d8e7831/examples/with-noscript/static/img/nextjs.png
--------------------------------------------------------------------------------
/examples/with-noscript/static/img/reactjs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oddcommit/Next-All-App/ae33f3f6a81ae352236b816db23b992b3d8e7831/examples/with-noscript/static/img/reactjs.png
--------------------------------------------------------------------------------
/examples/with-noscript/static/img/vuejs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oddcommit/Next-All-App/ae33f3f6a81ae352236b816db23b992b3d8e7831/examples/with-noscript/static/img/vuejs.png
--------------------------------------------------------------------------------
/examples/with-now-env/now-secrets.json:
--------------------------------------------------------------------------------
1 | {
2 | "@my-secret-key": "keep-it-secret",
3 | "@my-other-secret-key": "keep-it-secret-too"
4 | }
5 |
--------------------------------------------------------------------------------
/examples/with-now-env/now.json:
--------------------------------------------------------------------------------
1 | {
2 | "env": {
3 | "SECRET": "@my-secret-key",
4 | "ANOTHER_SECRET": "@my-other-secret-key",
5 | "SECRET_FAIL": "@this-is-not-defined"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/examples/with-now-env/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "with-now-env",
3 | "version": "1.0.0",
4 | "scripts": {
5 | "dev": "next",
6 | "build": "next build",
7 | "start": "next start"
8 | },
9 | "dependencies": {
10 | "next": "latest",
11 | "react": "^16.2.0",
12 | "react-dom": "^16.2.0"
13 | },
14 | "devDependencies": {
15 | "now-env": "^3.0.4"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/examples/with-pkg/index.js:
--------------------------------------------------------------------------------
1 | // when pkg-ing the app we set NODE_ENV as production and require the `./server.js`
2 | process.env.NODE_ENV = 'production'
3 | require('./server.js')
4 |
--------------------------------------------------------------------------------
/examples/with-pkg/pages/index.js:
--------------------------------------------------------------------------------
1 | export default () =>
2 | Home page
3 |
--------------------------------------------------------------------------------
/examples/with-polyfills/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "with-polyfills",
3 | "version": "1.0.0",
4 | "scripts": {
5 | "dev": "next",
6 | "build": "next build",
7 | "start": "next start"
8 | },
9 | "dependencies": {
10 | "next": "latest",
11 | "react": "^16.0.0",
12 | "react-dom": "^16.0.0"
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/examples/with-polyfills/pages/index.js:
--------------------------------------------------------------------------------
1 | console.log('Inside the /index.js page')
2 |
3 | export default () => (
4 |
5 | Hello World
6 |
7 | )
8 |
--------------------------------------------------------------------------------
/examples/with-portals/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "scripts": {
3 | "dev": "next",
4 | "build": "next build",
5 | "start": "next start"
6 | },
7 | "dependencies": {
8 | "next": "latest",
9 | "react": "^16.2.0",
10 | "react-dom": "^16.2.0"
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/examples/with-portals/pages/index.js:
--------------------------------------------------------------------------------
1 | import * as React from 'react'
2 |
3 | import { Modal } from '../components/Modal'
4 |
5 | export default () =>
6 |
--------------------------------------------------------------------------------
/examples/with-prefetching/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "with-prefetching",
3 | "version": "1.0.0",
4 | "scripts": {
5 | "dev": "next",
6 | "build": "next build",
7 | "start": "next start"
8 | },
9 | "dependencies": {
10 | "next": "latest",
11 | "react": "^16.0.0",
12 | "react-dom": "^16.0.0"
13 | },
14 | "author": "",
15 | "license": "ISC"
16 | }
17 |
--------------------------------------------------------------------------------
/examples/with-prefetching/pages/about.js:
--------------------------------------------------------------------------------
1 | export default () => This is the ABOUT page.
2 |
--------------------------------------------------------------------------------
/examples/with-prefetching/pages/contact.js:
--------------------------------------------------------------------------------
1 | export default () => This is the CONTACT page.
2 |
--------------------------------------------------------------------------------
/examples/with-prefetching/pages/features.js:
--------------------------------------------------------------------------------
1 | export default () => This is the FEATURES page.
2 |
--------------------------------------------------------------------------------
/examples/with-prefetching/pages/index.js:
--------------------------------------------------------------------------------
1 | export default () => This is the HOME page
2 |
--------------------------------------------------------------------------------
/examples/with-pretty-url-routing/pages/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | export default function IndexPage () {
4 | return (
5 |
6 |
Homepage
7 |
11 |
12 | )
13 | }
14 |
--------------------------------------------------------------------------------
/examples/with-react-ga/pages/about.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 | About us
3 | )
4 |
--------------------------------------------------------------------------------
/examples/with-react-ga/pages/index.js:
--------------------------------------------------------------------------------
1 | import Link from 'next/link'
2 |
3 | export default () => (
4 |
5 | Hello World.{' '}
6 |
7 |
About
8 |
9 |
10 | )
11 |
--------------------------------------------------------------------------------
/examples/with-react-helmet/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "with-react-helmet",
3 | "license": "ISC",
4 | "version": "1.0.0",
5 | "scripts": {
6 | "dev": "next",
7 | "build": "next build",
8 | "start": "next start"
9 | },
10 | "dependencies": {
11 | "next": "latest",
12 | "react": "^16.0.0",
13 | "react-dom": "^16.0.0",
14 | "react-helmet": "^5.1.3"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/examples/with-react-helmet/pages/index.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 | Hello World!
3 |
)
4 |
--------------------------------------------------------------------------------
/examples/with-react-intl/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | "next/babel"
4 | ],
5 | "env": {
6 | "development": {
7 | "plugins": [
8 | "react-intl"
9 | ]
10 | },
11 | "production": {
12 | "plugins": [
13 | ["react-intl", {
14 | "messagesDir": "lang/.messages/"
15 | }]
16 | ]
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/examples/with-react-intl/.gitignore:
--------------------------------------------------------------------------------
1 | lang/.messages/
2 |
--------------------------------------------------------------------------------
/examples/with-react-intl/lang/en.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "React Intl Next.js Example",
3 | "nav.home": "Home",
4 | "nav.about": "About",
5 | "description": "An example app integrating React Intl with Next.js",
6 | "greeting": "Hello, World!"
7 | }
--------------------------------------------------------------------------------
/examples/with-react-intl/lang/fr.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "React Intl Next.js Exemple",
3 | "nav.home": "Accueil",
4 | "nav.about": "À propos de nous",
5 | "description": "Un exemple d'application intégrant React Intl avec Next.js",
6 | "greeting": "Bonjour le monde!"
7 | }
8 |
--------------------------------------------------------------------------------
/examples/with-react-jss/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["next/babel"]
3 | }
--------------------------------------------------------------------------------
/examples/with-react-jss/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "with-react-jss",
3 | "version": "1.0.0",
4 | "scripts": {
5 | "dev": "next",
6 | "build": "next build",
7 | "start": "next start"
8 | },
9 | "dependencies": {
10 | "next": "latest",
11 | "react": "^16.0.0",
12 | "react-dom": "^16.0.0",
13 | "react-jss": "8.6.1"
14 | },
15 | "license": "ISC"
16 | }
17 |
--------------------------------------------------------------------------------
/examples/with-react-jss/pages/_app.js:
--------------------------------------------------------------------------------
1 | import App from 'next/app'
2 |
3 | export default class MyApp extends App {
4 | componentDidMount () {
5 | const style = document.getElementById('server-side-styles')
6 |
7 | if (style) {
8 | style.parentNode.removeChild(style)
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/examples/with-react-md/next.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | webpack: function (config) {
3 | if (config.resolve.alias) {
4 | delete config.resolve.alias['react']
5 | delete config.resolve.alias['react-dom']
6 | }
7 | return config
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/examples/with-react-md/static/react-md.light_blue-yellow.min.css:
--------------------------------------------------------------------------------
1 | ../node_modules/react-md/dist/react-md.light_blue-yellow.min.css
--------------------------------------------------------------------------------
/examples/with-react-relay-network-modern/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | "next/babel"
4 | ],
5 | "plugins": [
6 | "relay"
7 | ]
8 | }
--------------------------------------------------------------------------------
/examples/with-react-relay-network-modern/.env:
--------------------------------------------------------------------------------
1 | RELAY_ENDPOINT=https://api.graph.cool/relay/v1/next-js-with-relay-modern-example
2 |
--------------------------------------------------------------------------------
/examples/with-react-relay-network-modern/.gitignore:
--------------------------------------------------------------------------------
1 | __generated__/
2 | schema/schema.graphql
--------------------------------------------------------------------------------
/examples/with-react-relay-network-modern/.graphqlconfig:
--------------------------------------------------------------------------------
1 | {
2 | "schemaPath": "schema/schema.graphql",
3 | "extensions": {
4 | "endpoints": {
5 | "dev": "https://api.graph.cool/relay/v1/next-js-with-relay-modern-example"
6 | }
7 | }
8 | }
--------------------------------------------------------------------------------
/examples/with-react-relay-network-modern/lib/createEnvironment/index.js:
--------------------------------------------------------------------------------
1 | import 'isomorphic-fetch'
2 |
3 | export const { initEnvironment, createEnvironment } = (!process.browser
4 | ? require('./server')
5 | : require('./client')
6 | ).default
7 |
--------------------------------------------------------------------------------
/examples/with-react-relay-network-modern/schema/init-schema.graphql:
--------------------------------------------------------------------------------
1 | type BlogPost implements Node {
2 | content: String!
3 | createdAt: DateTime!
4 | id: ID! @isUnique
5 | title: String!
6 | updatedAt: DateTime!
7 | }
--------------------------------------------------------------------------------
/examples/with-react-uwp/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "with-react-uwp",
3 | "version": "1.0.0",
4 | "dependencies": {
5 | "babel-core": "^6.25.0",
6 | "next": "latest",
7 | "react": "^16.0.0",
8 | "react-dom": "^16.0.0",
9 | "react-uwp": "^1.0.9"
10 | },
11 | "scripts": {
12 | "dev": "next",
13 | "build": "next build",
14 | "start": "next start"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/examples/with-react-with-styles/defaultTheme.js:
--------------------------------------------------------------------------------
1 | export default {
2 | color: {
3 | primary: 'salmon'
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/examples/with-react-with-styles/pages/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { css, withStyles } from '../withStyles'
3 |
4 | function Home ({ styles }) {
5 | return (
6 |
7 |
My page
8 |
9 | )
10 | }
11 |
12 | export default withStyles(({ color }) => ({
13 | title: {
14 | color: color.primary
15 | }
16 | }))(Home)
17 |
--------------------------------------------------------------------------------
/examples/with-reasonml/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | "next/babel"
4 | ],
5 | "plugins": [
6 | "babel-plugin-bucklescript"
7 | ]
8 | }
9 |
--------------------------------------------------------------------------------
/examples/with-reasonml/.gitignore:
--------------------------------------------------------------------------------
1 | bs
2 | .merlin
3 | lib/
4 | *.bs.js
5 |
--------------------------------------------------------------------------------
/examples/with-reasonml/index.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oddcommit/Next-All-App/ae33f3f6a81ae352236b816db23b992b3d8e7831/examples/with-reasonml/index.js
--------------------------------------------------------------------------------
/examples/with-reasonml/next.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | pageExtensions: ['jsx', 'js', 'bs.js']
3 | }
4 |
--------------------------------------------------------------------------------
/examples/with-rebass/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | "next/babel"
4 | ],
5 | "plugins": [
6 | ["styled-components", { "ssr": true, "displayName": true, "preprocess": false } ]
7 | ]
8 | }
--------------------------------------------------------------------------------
/examples/with-rebass/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "scripts": {
3 | "dev": "next",
4 | "build": "next build",
5 | "start": "next start"
6 | },
7 | "dependencies": {
8 | "babel-plugin-styled-components": "^1.1.7",
9 | "next": "latest",
10 | "react": "^16.2.0",
11 | "react-dom": "^16.2.0",
12 | "rebass": "1.0.0-1",
13 | "styled-components": "^2.1.1"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/examples/with-recompose/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["next/babel"],
3 | "plugins": [
4 | ["lodash", { "id": ["lodash", "recompose"] }]
5 | ]
6 | }
7 |
--------------------------------------------------------------------------------
/examples/with-recompose/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "scripts": {
3 | "dev": "next",
4 | "build": "next build",
5 | "start": "next start"
6 | },
7 | "dependencies": {
8 | "babel-plugin-lodash": "^3.2.11",
9 | "next": "latest",
10 | "react": "^16.2.0",
11 | "react-dom": "^16.2.0",
12 | "recompose": "^0.24.0"
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/examples/with-redux-code-splitting/pages/about.js:
--------------------------------------------------------------------------------
1 | import {reduxPage} from '../config/redux'
2 | import About from '../containers/about'
3 |
4 | export default reduxPage(About)
5 |
--------------------------------------------------------------------------------
/examples/with-redux-code-splitting/pages/index.js:
--------------------------------------------------------------------------------
1 | import {reduxPage} from '../config/redux'
2 | import Homepage from '../containers/homepage'
3 |
4 | export default reduxPage(Homepage)
5 |
--------------------------------------------------------------------------------
/examples/with-redux-observable/demo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oddcommit/Next-All-App/ae33f3f6a81ae352236b816db23b992b3d8e7831/examples/with-redux-observable/demo.png
--------------------------------------------------------------------------------
/examples/with-redux-observable/pages/other.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Link from 'next/link'
3 |
4 | const OtherPage = () => (
5 |
11 | )
12 |
13 | export default OtherPage
14 |
--------------------------------------------------------------------------------
/examples/with-redux-observable/redux/actionTypes.js:
--------------------------------------------------------------------------------
1 | export const FETCH_CHARACTER = 'FETCH_CHARACTER'
2 | export const FETCH_CHARACTER_SUCCESS = 'FETCH_CHARACTER_SUCCESS'
3 | export const FETCH_CHARACTER_FAILURE = 'FETCH_CHARACTER_FAILURE'
4 | export const START_FETCHING_CHARACTERS = 'START_FETCHING_CHARACTERS'
5 | export const STOP_FETCHING_CHARACTERS = 'STOP_FETCHING_CHARACTERS'
6 |
--------------------------------------------------------------------------------
/examples/with-redux-reselect-recompose/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | "next/babel"
4 | ],
5 | "plugins": [
6 | ["module-resolver", {
7 | "root": ["./"]
8 | }]
9 | ]
10 | }
--------------------------------------------------------------------------------
/examples/with-redux-reselect-recompose/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
--------------------------------------------------------------------------------
/examples/with-redux-reselect-recompose/constants/actionTypes.js:
--------------------------------------------------------------------------------
1 | export const ADD = 'ADD'
2 | export const TICK = 'TICK'
3 |
--------------------------------------------------------------------------------
/examples/with-redux-reselect-recompose/reducers/index.js:
--------------------------------------------------------------------------------
1 | import { combineReducers } from 'redux'
2 | import count, { initialState as countState } from './count'
3 |
4 | export const intitialState = {
5 | count: countState
6 | }
7 |
8 | export default combineReducers({
9 | count
10 | })
11 |
--------------------------------------------------------------------------------
/examples/with-redux-wrapper/.npmrc:
--------------------------------------------------------------------------------
1 | package-lock=false
2 | save-exact=true
--------------------------------------------------------------------------------
/examples/with-reflux/actions/actions.js:
--------------------------------------------------------------------------------
1 | import Reflux from 'reflux'
2 |
3 | var Actions = Reflux.createActions([
4 | 'increment',
5 | 'decrement'
6 | ])
7 |
8 | export default Actions
9 |
--------------------------------------------------------------------------------
/examples/with-reflux/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "with-reflux",
3 | "version": "1.0.0",
4 | "scripts": {
5 | "dev": "next",
6 | "build": "next build",
7 | "start": "next start"
8 | },
9 | "dependencies": {
10 | "next": "latest",
11 | "react": "^16.0.0",
12 | "react-dom": "^16.0.0",
13 | "reflux": "^6.4.1"
14 | },
15 | "license": "ISC"
16 | }
17 |
--------------------------------------------------------------------------------
/examples/with-refnux/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "with-refnux",
3 | "version": "1.0.0",
4 | "scripts": {
5 | "next": "next"
6 | },
7 | "license": "ISC",
8 | "dependencies": {
9 | "next": "latest",
10 | "react": "^16.0.0",
11 | "react-dom": "^16.0.0",
12 | "refnux": "^1.3.0"
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/examples/with-refnux/store/counterIncrement.js:
--------------------------------------------------------------------------------
1 |
2 | const counterIncrement = ({counter}, dispatch) => {
3 | return { counter: counter + 1 }
4 | }
5 |
6 | export default counterIncrement
7 |
--------------------------------------------------------------------------------
/examples/with-refnux/store/getInitialState.js:
--------------------------------------------------------------------------------
1 | const getInitialState = () => {
2 | return {
3 | title: '',
4 | counter: 0
5 | }
6 | }
7 |
8 | export default getInitialState
9 |
--------------------------------------------------------------------------------
/examples/with-refnux/store/setTitle.js:
--------------------------------------------------------------------------------
1 |
2 | const setTitle = (newTitle) => ({title}) => {
3 | return { title: newTitle }
4 | }
5 |
6 | export default setTitle
7 |
--------------------------------------------------------------------------------
/examples/with-relay-modern/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | "next/babel"
4 | ],
5 | "plugins": [
6 | "relay"
7 | ]
8 | }
--------------------------------------------------------------------------------
/examples/with-relay-modern/.env:
--------------------------------------------------------------------------------
1 | RELAY_ENDPOINT=https://api.graph.cool/relay/v1/next-js-with-relay-modern-example
2 |
--------------------------------------------------------------------------------
/examples/with-relay-modern/.gitignore:
--------------------------------------------------------------------------------
1 | __generated__/
2 | schema/schema.graphql
--------------------------------------------------------------------------------
/examples/with-relay-modern/.graphqlconfig:
--------------------------------------------------------------------------------
1 | {
2 | "schemaPath": "schema/schema.graphql",
3 | "extensions": {
4 | "endpoints": {
5 | "dev": "https://api.graph.cool/relay/v1/next-js-with-relay-modern-example"
6 | }
7 | }
8 | }
--------------------------------------------------------------------------------
/examples/with-relay-modern/schema/init-schema.graphql:
--------------------------------------------------------------------------------
1 | type BlogPost implements Node {
2 | content: String!
3 | createdAt: DateTime!
4 | id: ID! @isUnique
5 | title: String!
6 | updatedAt: DateTime!
7 | }
--------------------------------------------------------------------------------
/examples/with-rematch/shared/models/index.js:
--------------------------------------------------------------------------------
1 | import counter from './counter'
2 | import github from './github'
3 |
4 | export { counter }
5 | export { github }
6 |
--------------------------------------------------------------------------------
/examples/with-rematch/shared/store.js:
--------------------------------------------------------------------------------
1 | import { init } from '@rematch/core'
2 | import { counter, github } from './models'
3 |
4 | // rematch store with initialValue set to 5
5 | export const initStore = (initialState = { counter: 5 }) => {
6 | return init({
7 | models: {
8 | counter,
9 | github
10 | },
11 | redux: {
12 | initialState
13 | }
14 | })
15 | }
16 |
--------------------------------------------------------------------------------
/examples/with-scoped-stylesheets-and-postcss/README.md:
--------------------------------------------------------------------------------
1 | # Scoped stylesheets and PostCSS
2 |
3 | This example has been deprecated in favor of the [@zeit/next-css](https://github.com/zeit/next-plugins/tree/master/packages/next-css#postcss-plugins) module.
4 |
--------------------------------------------------------------------------------
/examples/with-segment-analytics/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "with-segment-analytics",
3 | "scripts": {
4 | "dev": "next",
5 | "build": "next build",
6 | "start": "next start"
7 | },
8 | "dependencies": {
9 | "@segment/snippet": "^4.0.1",
10 | "next": "latest",
11 | "react": "^16.2.0",
12 | "react-dom": "^16.2.0"
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/examples/with-segment-analytics/pages/about.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Header from '../components/Header'
3 |
4 | export default () => (
5 |
6 |
7 |
This is the About page
8 |
9 | )
10 |
--------------------------------------------------------------------------------
/examples/with-segment-analytics/pages/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Header from '../components/Header'
3 |
4 | export default () => (
5 |
6 |
7 |
This is the Home page
8 |
9 | )
10 |
--------------------------------------------------------------------------------
/examples/with-sentry/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "with-sentry",
3 | "version": "1.0.0",
4 | "scripts": {
5 | "dev": "next",
6 | "build": "next build",
7 | "start": "next start"
8 | },
9 | "dependencies": {
10 | "next": "latest",
11 | "@sentry/browser": "^4.0.4",
12 | "react": "^16.5.2",
13 | "react-dom": "^16.5.2"
14 | },
15 | "license": "ISC"
16 | }
17 |
--------------------------------------------------------------------------------
/examples/with-shallow-routing/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "with-shallow-routing",
3 | "version": "1.0.0",
4 | "scripts": {
5 | "dev": "next",
6 | "build": "next build",
7 | "start": "next start"
8 | },
9 | "dependencies": {
10 | "next": "latest",
11 | "react": "^16.0.0",
12 | "react-dom": "^16.0.0"
13 | },
14 | "license": "ISC"
15 | }
16 |
--------------------------------------------------------------------------------
/examples/with-shallow-routing/pages/about.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 | About us
3 | )
4 |
--------------------------------------------------------------------------------
/examples/with-sitemap-and-robots-express-server-typescript/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | "next/babel",
4 | "@zeit/next-typescript/babel"
5 | ]
6 | }
7 |
--------------------------------------------------------------------------------
/examples/with-sitemap-and-robots-express-server-typescript/.gitignore:
--------------------------------------------------------------------------------
1 | *~
2 | *.swp
3 | tmp/
4 | npm-debug.log
5 | .DS_Store
6 |
7 |
8 | .build/*
9 | .next
10 | .vscode/
11 | node_modules/
12 | .coverage
13 | .env
14 | .next
15 |
16 | yarn-error.log
--------------------------------------------------------------------------------
/examples/with-sitemap-and-robots-express-server-typescript/.npmignore:
--------------------------------------------------------------------------------
1 | .build/
2 | .next/
3 | .vscode/
4 | node_modules/
5 |
6 | README.md
7 |
8 | .env
9 | .eslintrc.js
10 | .gitignore
--------------------------------------------------------------------------------
/examples/with-sitemap-and-robots-express-server-typescript/now.json:
--------------------------------------------------------------------------------
1 | {
2 | "env": {
3 | "NODE_ENV": "production"
4 | },
5 | "scale": {
6 | "sfo1": {
7 | "min": 1,
8 | "max": 1
9 | }
10 | },
11 | "alias": "https://sitemap-robots-typescript.now.sh"
12 | }
--------------------------------------------------------------------------------
/examples/with-sitemap-and-robots-express-server-typescript/src/components/RobotsLink.tsx:
--------------------------------------------------------------------------------
1 | const RobotsLink = () => {
2 | return (
3 |
4 | Robots
5 |
6 | );
7 | };
8 |
9 | export { RobotsLink };
10 |
--------------------------------------------------------------------------------
/examples/with-sitemap-and-robots-express-server-typescript/src/components/SitemapLink.tsx:
--------------------------------------------------------------------------------
1 | const SitemapLink = () => {
2 | return (
3 |
4 | Sitemap
5 |
6 | );
7 | };
8 |
9 | export { SitemapLink };
10 |
--------------------------------------------------------------------------------
/examples/with-sitemap-and-robots-express-server-typescript/src/static/robots.txt:
--------------------------------------------------------------------------------
1 | User-agent: *
2 | Allow: /a
3 | Allow: /b
4 | Allow: /posts/*
5 | Disallow: /
6 | Disallow: /a/*
7 | Disallow: /b/*
8 | Disallow: /posts
9 |
10 | Sitemap: https://sitemap-robots.now.sh/sitemap.xml
--------------------------------------------------------------------------------
/examples/with-sitemap-and-robots-express-server/.gitignore:
--------------------------------------------------------------------------------
1 | *~
2 | *.swp
3 | tmp/
4 | npm-debug.log
5 | .DS_Store
6 |
7 |
8 | .build/*
9 | .next
10 | .vscode/
11 | node_modules/
12 | .coverage
13 | .env
14 | .next
15 |
16 | yarn-error.log
--------------------------------------------------------------------------------
/examples/with-sitemap-and-robots-express-server/.npmignore:
--------------------------------------------------------------------------------
1 | .build/
2 | .next/
3 | .vscode/
4 | node_modules/
5 |
6 | README.md
7 |
8 | .env
9 | .eslintrc.js
10 | .gitignore
--------------------------------------------------------------------------------
/examples/with-sitemap-and-robots-express-server/now.json:
--------------------------------------------------------------------------------
1 | {
2 | "env": {
3 | "NODE_ENV": "production"
4 | },
5 | "scale": {
6 | "sfo1": {
7 | "min": 1,
8 | "max": 1
9 | }
10 | },
11 | "alias": "https://sitemap-robots.now.sh"
12 | }
--------------------------------------------------------------------------------
/examples/with-sitemap-and-robots-express-server/server/posts.js:
--------------------------------------------------------------------------------
1 | const posts = () => {
2 | const arrayOfPosts = []
3 | const n = 5
4 |
5 | for (let i = 1; i < n + 1; i += 1) {
6 | arrayOfPosts.push({ name: `Post ${i}`, slug: `post-${i}` })
7 | }
8 | return arrayOfPosts
9 | }
10 |
11 | module.exports = posts
12 |
--------------------------------------------------------------------------------
/examples/with-sitemap-and-robots-express-server/static/robots.txt:
--------------------------------------------------------------------------------
1 | User-agent: *
2 | Allow: /a
3 | Allow: /b
4 | Allow: /posts/*
5 | Disallow: /
6 | Disallow: /a/*
7 | Disallow: /b/*
8 | Disallow: /posts
9 |
10 | Sitemap: https://sitemap-robots.now.sh/sitemap.xml
--------------------------------------------------------------------------------
/examples/with-static-export/components/post.js:
--------------------------------------------------------------------------------
1 | import Link from 'next/link'
2 |
3 | export default props =>
4 |
5 | {props.title}
6 | {props.body}
7 | {/* render the URL as /post/:id */}
8 |
9 | Read more...
10 |
11 |
12 |
--------------------------------------------------------------------------------
/examples/with-storybook/.storybook/addons.js:
--------------------------------------------------------------------------------
1 | import '@storybook/addon-actions/register'
2 | import '@storybook/addon-links/register'
3 |
--------------------------------------------------------------------------------
/examples/with-storybook/.storybook/config.js:
--------------------------------------------------------------------------------
1 | import { configure } from '@storybook/react'
2 |
3 | // automatically import all files ending in *.stories.js
4 | const req = require.context('../stories', true, /.stories.js$/)
5 | function loadStories () {
6 | req.keys().forEach(filename => req(filename))
7 | }
8 |
9 | configure(loadStories, module)
10 |
--------------------------------------------------------------------------------
/examples/with-storybook/components/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | export default () => Hello World
3 |
--------------------------------------------------------------------------------
/examples/with-storybook/pages/index.js:
--------------------------------------------------------------------------------
1 | import HelloWorld from '../components'
2 | export default () => (
3 |
4 |
Simple Storybook Example
5 |
6 |
7 | )
8 |
--------------------------------------------------------------------------------
/examples/with-strict-csp-hash/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "with-strict-csp-hash",
3 | "version": "1.0.0",
4 | "scripts": {
5 | "dev": "next",
6 | "build": "next build",
7 | "start": "next start"
8 | },
9 | "dependencies": {
10 | "next": "latest",
11 | "react": "^16.0.0",
12 | "react-dom": "^16.0.0"
13 | },
14 | "license": "ISC"
15 | }
16 |
--------------------------------------------------------------------------------
/examples/with-strict-csp-hash/pages/index.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 | Hello World
3 | )
4 |
--------------------------------------------------------------------------------
/examples/with-strict-csp/pages/index.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 | Hello World
3 | )
4 |
--------------------------------------------------------------------------------
/examples/with-style-sheet/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | "next/babel"
4 | ],
5 | "plugins": [
6 | "style-sheet/babel"
7 | ]
8 | }
9 |
--------------------------------------------------------------------------------
/examples/with-styled-components/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | "next/babel"
4 | ],
5 | "plugins": [
6 | "styled-components"
7 | ]
8 | }
9 |
--------------------------------------------------------------------------------
/examples/with-styled-components/pages/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import styled from 'styled-components'
3 |
4 | const Title = styled.h1`
5 | color: red;
6 | font-size: 50px;
7 | `
8 |
9 | export default () => My page
10 |
--------------------------------------------------------------------------------
/examples/with-styled-jsx-plugins/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | [
4 | "next/babel",
5 | {
6 | "styled-jsx": {
7 | "plugins": [
8 | "styled-jsx-plugin-postcss"
9 | ]
10 | }
11 | }
12 | ]
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/examples/with-styled-jsx-postcss/readme.md:
--------------------------------------------------------------------------------
1 | This examples was moved to [https://github.com/zeit/next.js/tree/master/examples/with-styled-jsx-plugins](https://github.com/zeit/next.js/tree/master/examples/with-styled-jsx-plugins)
2 |
--------------------------------------------------------------------------------
/examples/with-styled-jsx-scss/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | [
4 | "next/babel",
5 | {
6 | "styled-jsx": {
7 | "plugins": [
8 | "styled-jsx-plugin-sass"
9 | ]
10 | }
11 | }
12 | ]
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/examples/with-styletron/layout.js:
--------------------------------------------------------------------------------
1 | import { StyletronProvider } from 'styletron-react'
2 | import getStyletron from './styletron'
3 |
4 | export default ({ children }) => (
5 |
6 | {children}
7 |
8 | )
9 |
--------------------------------------------------------------------------------
/examples/with-styletron/next.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | webpack: function (config) {
3 | config.externals = config.externals || {}
4 | config.externals['styletron-server'] = 'styletron-server'
5 | return config
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/examples/with-styletron/pages/index.js:
--------------------------------------------------------------------------------
1 | import { styled } from 'styletron-react'
2 | import Page from '../layout'
3 |
4 | const Title = styled('div', {
5 | color: 'red',
6 | fontSize: '50px'
7 | })
8 |
9 | export default () => (
10 |
11 | My page
12 |
13 | )
14 |
--------------------------------------------------------------------------------
/examples/with-sw-precache/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | [ "next/babel" ]
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/examples/with-sw-precache/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "with-sw-precache",
3 | "version": "1.0.0",
4 | "scripts": {
5 | "build": "next build",
6 | "start": "NODE_ENV=production node server.js"
7 | },
8 | "dependencies": {
9 | "next": "latest",
10 | "react": "^16.0.0",
11 | "react-dom": "^16.0.0",
12 | "sw-precache-webpack-plugin": "^0.11.3"
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/examples/with-tailwindcss/next.config.js:
--------------------------------------------------------------------------------
1 | const withCSS = require('@zeit/next-css')
2 |
3 | module.exports = withCSS({})
4 |
--------------------------------------------------------------------------------
/examples/with-tailwindcss/pages/index.js:
--------------------------------------------------------------------------------
1 | import Nav from '../components/nav'
2 |
3 | export default () => (
4 |
5 |
6 |
7 |
Next.js + Tailwind css
8 |
9 |
10 | )
11 |
--------------------------------------------------------------------------------
/examples/with-tailwindcss/postcss.config.js:
--------------------------------------------------------------------------------
1 | var tailwindcss = require('tailwindcss')
2 |
3 | module.exports = {
4 | plugins: [
5 | require('postcss-easy-import'),
6 | tailwindcss('./tailwind.config.js'),
7 | require('autoprefixer')
8 | ]
9 | }
10 |
--------------------------------------------------------------------------------
/examples/with-tailwindcss/styles/button.css:
--------------------------------------------------------------------------------
1 | .btn-blue {
2 | @apply .bg-blue .text-white .font-bold .py-2 .px-4 .rounded;
3 | }
4 |
--------------------------------------------------------------------------------
/examples/with-tailwindcss/styles/index.css:
--------------------------------------------------------------------------------
1 | @import "./button.css";
2 |
3 | @tailwind preflight;
4 | @tailwind utilities;
5 |
6 | .hero {
7 | width: 100%;
8 | color: #333;
9 | }
10 |
11 | .title {
12 | margin: 0;
13 | width: 100%;
14 | padding-top: 80px;
15 | line-height: 1.15;
16 | font-size: 48px;
17 | }
18 |
19 | .title, .description {
20 | text-align: center;
21 | }
22 |
--------------------------------------------------------------------------------
/examples/with-ts-node/next.config.js:
--------------------------------------------------------------------------------
1 | const withTypescript = require('next-with-typescript')
2 | module.exports = withTypescript()
3 |
--------------------------------------------------------------------------------
/examples/with-ts-node/nodemon.json:
--------------------------------------------------------------------------------
1 | {
2 | "watch": ["server/**/*.ts"],
3 | "execMap": {
4 | "ts": "ts-node --typeCheck --compilerOptions '{\"module\":\"commonjs\"}'"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/examples/with-ts-node/pages/a.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | export default () => a
4 |
--------------------------------------------------------------------------------
/examples/with-ts-node/pages/b.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | export default () => b
4 |
--------------------------------------------------------------------------------
/examples/with-ts-node/pages/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Link from 'next/link'
3 |
4 | export default () => (
5 |
9 | )
10 |
--------------------------------------------------------------------------------
/examples/with-typescript/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | "next/babel",
4 | "@zeit/next-typescript/babel"
5 | ]
6 | }
--------------------------------------------------------------------------------
/examples/with-typescript/next.config.js:
--------------------------------------------------------------------------------
1 | const withTypescript = require('@zeit/next-typescript')
2 | module.exports = withTypescript()
3 |
--------------------------------------------------------------------------------
/examples/with-typescript/pages/about.tsx:
--------------------------------------------------------------------------------
1 | import Link from 'next/link'
2 | import Layout from '../components/Layout';
3 |
4 | export default () => (
5 |
6 | This is the about page
7 | Go home
8 |
9 | )
--------------------------------------------------------------------------------
/examples/with-typescript/pages/index.tsx:
--------------------------------------------------------------------------------
1 | import Link from 'next/link'
2 | import Layout from '../components/Layout';
3 |
4 | export default () => (
5 |
6 | Hello Next.js 👋
7 | About
8 |
9 | )
10 |
--------------------------------------------------------------------------------
/examples/with-typestyle/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "with-typestyle",
3 | "version": "1.0.0",
4 | "scripts": {
5 | "dev": "next",
6 | "build": "next build",
7 | "start": "next start"
8 | },
9 | "dependencies": {
10 | "next": "latest",
11 | "react": "^16.0.0",
12 | "react-dom": "^16.0.0",
13 | "typestyle": "^2.0.1"
14 | },
15 | "license": "ISC"
16 | }
17 |
--------------------------------------------------------------------------------
/examples/with-typestyle/pages/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { style } from 'typestyle'
3 |
4 | const className = style({color: 'red'})
5 | const RedText = ({text}) => (
6 |
7 | {text}
8 |
9 | )
10 |
11 | export default () =>
12 |
--------------------------------------------------------------------------------
/examples/with-typings-for-css-modules/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | "next/babel",
4 | "@zeit/next-typescript/babel"
5 | ]
6 | }
--------------------------------------------------------------------------------
/examples/with-typings-for-css-modules/pages/index.tsx:
--------------------------------------------------------------------------------
1 | /* With CSS Modules */
2 | import css from "../style.css"
3 |
4 | export default () => (
5 |
6 |
Hello World, I am being styled using Typed CSS Modules!
7 |
8 | )
9 |
--------------------------------------------------------------------------------
/examples/with-typings-for-css-modules/style.css:
--------------------------------------------------------------------------------
1 | .example {
2 | font-size: 50px;
3 | color: papayawhip;
4 | }
5 |
6 | .example__description > strong {
7 | color: tomato;
8 | text-transform: uppercase;
9 | font-style: italic;
10 | }
11 |
--------------------------------------------------------------------------------
/examples/with-typings-for-css-modules/style.css.d.ts:
--------------------------------------------------------------------------------
1 | export const example: string;
2 | export const example__description: string;
3 | export const exampleDescription: string;
4 |
--------------------------------------------------------------------------------
/examples/with-universal-configuration-runtime/next.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | publicRuntimeConfig: {
3 | API_URL: process.env.API_URL
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/examples/with-universal-configuration-runtime/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "scripts": {
3 | "dev": "next",
4 | "build": "next build",
5 | "start": "next start"
6 | },
7 | "dependencies": {
8 | "next": "latest",
9 | "react": "16.2.0",
10 | "react-dom": "16.2.0"
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/examples/with-universal-configuration/.babelrc.js:
--------------------------------------------------------------------------------
1 | const env = require('./env-config.js')
2 |
3 | module.exports = {
4 | presets: ['next/babel'],
5 | plugins: [['transform-define', env]]
6 | }
7 |
--------------------------------------------------------------------------------
/examples/with-universal-configuration/env-config.js:
--------------------------------------------------------------------------------
1 | const prod = process.env.NODE_ENV === 'production'
2 |
3 | module.exports = {
4 | 'process.env.BACKEND_URL': prod ? 'https://api.example.com' : 'https://localhost:8080'
5 | }
6 |
--------------------------------------------------------------------------------
/examples/with-universal-configuration/pages/index.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 | Loading data from { process.env.BACKEND_URL }
3 | )
4 |
--------------------------------------------------------------------------------
/examples/with-unstated/.gitignore:
--------------------------------------------------------------------------------
1 | .vscode/
2 | node_modules/
--------------------------------------------------------------------------------
/examples/with-unstated/components/Counter.js:
--------------------------------------------------------------------------------
1 | export default ({ counter }) => (
2 |
3 |
Count: {counter.state.count}
4 | counter.decrement()}>-1
5 | counter.increment()}>+1
6 | counter.reset()}>Reset
7 |
8 | )
9 |
--------------------------------------------------------------------------------
/examples/with-unstated/components/index.js:
--------------------------------------------------------------------------------
1 | import Clock from './Clock'
2 | import Counter from './Counter'
3 |
4 | export { Clock, Counter }
5 |
--------------------------------------------------------------------------------
/examples/with-unstated/containers/index.js:
--------------------------------------------------------------------------------
1 | import CounterContainer from './CounterContainer'
2 | import ClockContainer from './ClockContainer'
3 |
4 | export { CounterContainer, ClockContainer }
5 |
--------------------------------------------------------------------------------
/examples/with-unstated/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "with-unstated",
3 | "version": "1.0.0",
4 | "scripts": {
5 | "dev": "next",
6 | "build": "next build",
7 | "start": "next start"
8 | },
9 | "dependencies": {
10 | "next": "latest",
11 | "react": "^16.4.1",
12 | "react-dom": "^16.4.1",
13 | "unstated": "^2.1.1"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/examples/with-webassembly/.gitignore:
--------------------------------------------------------------------------------
1 | .next
2 |
--------------------------------------------------------------------------------
/examples/with-webassembly/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "next-rust"
3 | version = "0.1.0"
4 | authors = ["Tim Neutkens "]
5 |
6 | [dependencies]
7 |
--------------------------------------------------------------------------------
/examples/with-webassembly/add.wasm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oddcommit/Next-All-App/ae33f3f6a81ae352236b816db23b992b3d8e7831/examples/with-webassembly/add.wasm
--------------------------------------------------------------------------------
/examples/with-webassembly/next.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | webpack (config) {
3 | config.output.webassemblyModuleFilename = 'static/wasm/[modulehash].wasm'
4 | return config
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/examples/with-webassembly/src/add.rs:
--------------------------------------------------------------------------------
1 | #[no_mangle]
2 | pub extern "C" fn add_one(x: i32) -> i32 {
3 | x + 1
4 | }
--------------------------------------------------------------------------------
/examples/with-webpack-bundle-analyzer/README.md:
--------------------------------------------------------------------------------
1 | # Webpack Bundle Analyzer example
2 |
3 | This example have been moved here: [analyze-bundles](https://github.com/zeit/next.js/tree/canary/examples/analyze-bundles)
4 |
--------------------------------------------------------------------------------
/examples/with-webpack-bundle-size-analyzer/pages/about.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 | About us
3 | )
4 |
--------------------------------------------------------------------------------
/examples/with-webpack-bundle-size-analyzer/pages/contact.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 |
3 | This is the contact page.
4 |
5 | )
6 |
--------------------------------------------------------------------------------
/examples/with-yarn-workspaces/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "private": true,
3 | "workspaces": ["packages/*"],
4 | "scripts": {
5 | "dev": "yarn --cwd packages/web-app dev",
6 | "build": "yarn --cwd packages/web-app build",
7 | "start": "yarn --cwd packages/web-app start"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/examples/with-yarn-workspaces/packages/bar/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const Bar = () => (
4 |
5 | bar
6 |
7 | )
8 |
9 | export default Bar
10 |
--------------------------------------------------------------------------------
/examples/with-yarn-workspaces/packages/bar/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "bar",
3 | "version": "1.0.0",
4 | "license": "ISC",
5 | "peerDependencies": {
6 | "react": "^16.0.0"
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/examples/with-yarn-workspaces/packages/foo/index.js:
--------------------------------------------------------------------------------
1 | module.exports = 'foo'
2 |
--------------------------------------------------------------------------------
/examples/with-yarn-workspaces/packages/foo/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "foo",
3 | "version": "1.0.0",
4 | "license": "ISC"
5 | }
6 |
--------------------------------------------------------------------------------
/examples/with-yarn-workspaces/packages/web-app/next.config.js:
--------------------------------------------------------------------------------
1 | const withTM = require('next-plugin-transpile-modules')
2 |
3 | // Tell webpack to compile the "bar" package
4 | // https://www.npmjs.com/package/next-plugin-transpile-modules
5 | module.exports = withTM({
6 | transpileModules: ['bar']
7 | })
8 |
--------------------------------------------------------------------------------
/examples/with-yarn-workspaces/packages/web-app/pages/index.js:
--------------------------------------------------------------------------------
1 | import foo from 'foo'
2 | import Bar from 'bar'
3 |
4 | export default () => (
5 |
6 | Imported modules from another workspace:
7 |
{foo}
8 |
9 |
10 | )
11 |
--------------------------------------------------------------------------------
/examples/with-zones/blog/.gitignore:
--------------------------------------------------------------------------------
1 | .next
2 | node_modules
3 |
--------------------------------------------------------------------------------
/examples/with-zones/blog/next.config.js:
--------------------------------------------------------------------------------
1 | const { NOW_URL } = process.env
2 | const { alias } = require('./now.json')
3 |
4 | module.exports = {
5 | assetPrefix: NOW_URL ? `https://${alias}` : 'http://localhost:5000'
6 | }
7 |
--------------------------------------------------------------------------------
/examples/with-zones/blog/now.json:
--------------------------------------------------------------------------------
1 | {
2 | "alias": "with-zones-blog.now.sh"
3 | }
4 |
--------------------------------------------------------------------------------
/examples/with-zones/blog/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "with-zones-blog",
3 | "version": "1.0.0",
4 | "scripts": {
5 | "build": "next build",
6 | "start": "next start -p 5000"
7 | },
8 | "dependencies": {
9 | "next": "latest",
10 | "react": "^16.0.0",
11 | "react-dom": "^16.0.0"
12 | },
13 | "license": "ISC"
14 | }
15 |
--------------------------------------------------------------------------------
/examples/with-zones/blog/pages/blog.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 |
3 | This is our blog
4 |
5 | )
6 |
--------------------------------------------------------------------------------
/examples/with-zones/home/.gitignore:
--------------------------------------------------------------------------------
1 | .next
2 | node_modules
3 |
--------------------------------------------------------------------------------
/examples/with-zones/home/components/Header.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 |
3 |
The Company
4 |
5 | )
6 |
--------------------------------------------------------------------------------
/examples/with-zones/home/next.config.js:
--------------------------------------------------------------------------------
1 | const { NOW_URL } = process.env
2 | const { alias } = require('./now.json')
3 |
4 | module.exports = {
5 | assetPrefix: NOW_URL ? `https://${alias}` : 'http://localhost:4000'
6 | }
7 |
--------------------------------------------------------------------------------
/examples/with-zones/home/now.json:
--------------------------------------------------------------------------------
1 | {
2 | "alias": "with-zones-home.now.sh"
3 | }
4 |
--------------------------------------------------------------------------------
/examples/with-zones/home/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "with-zones-home",
3 | "version": "1.0.0",
4 | "scripts": {
5 | "build": "next build",
6 | "start": "next start -p 4000"
7 | },
8 | "dependencies": {
9 | "next": "latest",
10 | "react": "^16.0.0",
11 | "react-dom": "^16.0.0"
12 | },
13 | "license": "ISC"
14 | }
15 |
--------------------------------------------------------------------------------
/examples/with-zones/home/pages/about.js:
--------------------------------------------------------------------------------
1 | import asset from 'next/asset'
2 | import Link from 'next/link'
3 |
4 | export default () => (
5 |
6 |
This is the about page.
7 |
8 |
9 |
10 | )
11 |
--------------------------------------------------------------------------------
/examples/with-zones/home/static/nextjs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oddcommit/Next-All-App/ae33f3f6a81ae352236b816db23b992b3d8e7831/examples/with-zones/home/static/nextjs.png
--------------------------------------------------------------------------------
/examples/with-zones/home/static/zeit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oddcommit/Next-All-App/ae33f3f6a81ae352236b816db23b992b3d8e7831/examples/with-zones/home/static/zeit.png
--------------------------------------------------------------------------------
/examples/with-zones/rules-dev.json:
--------------------------------------------------------------------------------
1 | {
2 | "rules": [
3 | {"pathname": "/blog", "method":["GET", "POST", "OPTIONS"], "dest": "http://localhost:5000"},
4 | {"pathname": "/**", "dest": "http://localhost:4000"}
5 | ]
6 | }
7 |
--------------------------------------------------------------------------------
/examples/with-zones/rules-prod.json:
--------------------------------------------------------------------------------
1 | {
2 | "rules": [
3 | {"pathname": "/blog", "method":["GET", "POST", "OPTIONS"], "dest": "https://with-zones-blog.now.sh"},
4 | {"pathname": "/**", "dest": "https://with-zones-home.now.sh"}
5 | ]
6 | }
7 |
--------------------------------------------------------------------------------
/jest.config.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 |
3 | module.exports = {
4 | testMatch: ['**/*.test.js'],
5 | verbose: true,
6 | bail: true,
7 | testEnvironment: 'node',
8 | rootDir: 'test',
9 | modulePaths: ['/lib'],
10 | globalSetup: '/jest-global-setup.js',
11 | globalTeardown: '/jest-global-teardown.js',
12 | coverageReporters: ['text', 'lcov', 'cobertura']
13 | }
14 |
--------------------------------------------------------------------------------
/lerna.json:
--------------------------------------------------------------------------------
1 | {
2 | "npmClient": "yarn",
3 | "useWorkspaces": true,
4 | "packages": [
5 | "packages/*"
6 | ],
7 | "command": {
8 | "publish": {
9 | "npmClient": "npm",
10 | "allowBranch": "canary",
11 | "registry": "https://registry.npmjs.org/"
12 | }
13 | },
14 | "version": "7.0.2-canary.41"
15 | }
16 |
--------------------------------------------------------------------------------
/packages/next-server/asset.js:
--------------------------------------------------------------------------------
1 | module.exports = require('./dist/lib/asset')
2 |
--------------------------------------------------------------------------------
/packages/next-server/config.js:
--------------------------------------------------------------------------------
1 | module.exports = require('./dist/lib/runtime-config')
2 |
--------------------------------------------------------------------------------
/packages/next-server/constants.js:
--------------------------------------------------------------------------------
1 | module.exports = require('./dist/lib/constants')
2 |
--------------------------------------------------------------------------------
/packages/next-server/dynamic.js:
--------------------------------------------------------------------------------
1 | module.exports = require('./dist/lib/dynamic')
2 |
--------------------------------------------------------------------------------
/packages/next-server/head.js:
--------------------------------------------------------------------------------
1 | module.exports = require('./dist/lib/head')
2 |
--------------------------------------------------------------------------------
/packages/next-server/index.js:
--------------------------------------------------------------------------------
1 | // This file is used for when users run `require('next-server')`
2 | const Server = require('./dist/server/next-server').default
3 | module.exports = function (options) {
4 | return new Server(options)
5 | }
6 |
--------------------------------------------------------------------------------
/packages/next-server/lib/router/shallow-equals.js:
--------------------------------------------------------------------------------
1 | export default function shallowEquals (a, b) {
2 | for (const i in a) {
3 | if (b[i] !== a[i]) return false
4 | }
5 |
6 | for (const i in b) {
7 | if (b[i] !== a[i]) return false
8 | }
9 |
10 | return true
11 | }
12 |
--------------------------------------------------------------------------------
/packages/next-server/lib/runtime-config.js:
--------------------------------------------------------------------------------
1 | let runtimeConfig
2 |
3 | export default () => {
4 | return runtimeConfig
5 | }
6 |
7 | export function setConfig (configValue) {
8 | runtimeConfig = configValue
9 | }
10 |
--------------------------------------------------------------------------------
/packages/next-server/next-config.js:
--------------------------------------------------------------------------------
1 | module.exports = require('./dist/server/config').default
2 |
--------------------------------------------------------------------------------
/packages/next-server/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "strict": true,
4 | "allowJs": true,
5 | "noEmit": true,
6 | "module": "esnext",
7 | "target": "ES2017",
8 | "esModuleInterop": true,
9 | "moduleResolution": "node",
10 | "jsx": "react"
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/packages/next/app.js:
--------------------------------------------------------------------------------
1 | module.exports = require('./dist/pages/_app')
2 |
--------------------------------------------------------------------------------
/packages/next/asset.js:
--------------------------------------------------------------------------------
1 | module.exports = require('next-server/asset')
2 |
--------------------------------------------------------------------------------
/packages/next/babel.js:
--------------------------------------------------------------------------------
1 | module.exports = require('./dist/build/babel/preset')
2 |
--------------------------------------------------------------------------------
/packages/next/bin/next-init:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 | console.log('`next init` is not supported anymore. These community projects provide the same functionality as `next init` with additional features: http://npmjs.com/next-init and http://npmjs.com/create-next-app.')
3 |
4 | process.exit(0)
5 |
--------------------------------------------------------------------------------
/packages/next/build/is-writeable.ts:
--------------------------------------------------------------------------------
1 | import fs from 'fs'
2 | import {promisify} from 'util'
3 |
4 | const access = promisify(fs.access)
5 |
6 | export async function isWriteable (directory: string): Promise {
7 | try {
8 | await access(directory, (fs.constants || fs).W_OK)
9 | return true
10 | } catch (err) {
11 | return false
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/packages/next/client.js:
--------------------------------------------------------------------------------
1 | module.exports = require('./dist/client/index')
2 |
--------------------------------------------------------------------------------
/packages/next/client/next.js:
--------------------------------------------------------------------------------
1 | import initNext, * as next from './'
2 |
3 | window.next = next
4 |
5 | initNext()
6 | .catch((err) => {
7 | console.error(`${err.message}\n${err.stack}`)
8 | })
9 |
--------------------------------------------------------------------------------
/packages/next/client/noop.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oddcommit/Next-All-App/ae33f3f6a81ae352236b816db23b992b3d8e7831/packages/next/client/noop.js
--------------------------------------------------------------------------------
/packages/next/config.js:
--------------------------------------------------------------------------------
1 | module.exports = require('next-server/config')
2 |
--------------------------------------------------------------------------------
/packages/next/constants.js:
--------------------------------------------------------------------------------
1 | module.exports = require('next-server/constants')
2 |
--------------------------------------------------------------------------------
/packages/next/document.js:
--------------------------------------------------------------------------------
1 | module.exports = require('./dist/pages/_document')
2 |
--------------------------------------------------------------------------------
/packages/next/dynamic.js:
--------------------------------------------------------------------------------
1 | module.exports = require('next-server/dynamic')
2 |
--------------------------------------------------------------------------------
/packages/next/error.js:
--------------------------------------------------------------------------------
1 | module.exports = require('./dist/pages/_error')
2 |
--------------------------------------------------------------------------------
/packages/next/head.js:
--------------------------------------------------------------------------------
1 | module.exports = require('next-server/head')
2 |
--------------------------------------------------------------------------------
/packages/next/link.js:
--------------------------------------------------------------------------------
1 | module.exports = require('./dist/client/link')
2 |
--------------------------------------------------------------------------------
/packages/next/router.js:
--------------------------------------------------------------------------------
1 | module.exports = require('./dist/client/router')
2 |
--------------------------------------------------------------------------------
/packages/next/server/lib/utils.js:
--------------------------------------------------------------------------------
1 | export function printAndExit (message, code = 1) {
2 | if (code === 0) {
3 | console.log(message)
4 | } else {
5 | console.error(message)
6 | }
7 |
8 | process.exit(code)
9 | }
10 |
--------------------------------------------------------------------------------
/packages/next/server/next.js:
--------------------------------------------------------------------------------
1 | // This file is used for when users run `require('next')`
2 | module.exports = (options) => {
3 | if (options.dev) {
4 | const Server = require('./next-dev-server').default
5 | return new Server(options)
6 | }
7 |
8 | const next = require('next-server')
9 | return next(options)
10 | }
11 |
--------------------------------------------------------------------------------
/packages/next/types/index.d.ts:
--------------------------------------------------------------------------------
1 | declare module '@babel/plugin-transform-modules-commonjs';
2 | declare module 'next-server/next-config';
3 | declare module 'next-server/constants';
4 |
--------------------------------------------------------------------------------
/readme.md:
--------------------------------------------------------------------------------
1 | packages/next/README.md
--------------------------------------------------------------------------------
/test/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | "next/babel"
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/test/.gitignore:
--------------------------------------------------------------------------------
1 | !node_modules
2 |
--------------------------------------------------------------------------------
/test/integration/app-aspath/pages/index.js:
--------------------------------------------------------------------------------
1 | export default props => JSON.stringify(props, null, 2)
2 |
--------------------------------------------------------------------------------
/test/integration/app-document/pages/about.js:
--------------------------------------------------------------------------------
1 | import Link from 'next/link'
2 |
3 | export default () =>
7 |
--------------------------------------------------------------------------------
/test/integration/app-document/pages/index.js:
--------------------------------------------------------------------------------
1 | import Link from 'next/link'
2 | export default () =>
6 |
--------------------------------------------------------------------------------
/test/integration/app-document/pages/shared.js:
--------------------------------------------------------------------------------
1 | import currentState from '../shared-module'
2 |
3 | export default () => {
4 | return {currentState()}
5 | }
6 |
--------------------------------------------------------------------------------
/test/integration/app-document/shared-module.js:
--------------------------------------------------------------------------------
1 | let moduleState = 'INITIAL'
2 |
3 | export function setState (state) {
4 | moduleState = state
5 | }
6 |
7 | export default function currentState () {
8 | return moduleState
9 | }
10 |
--------------------------------------------------------------------------------
/test/integration/babel/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | "next/babel",
4 | "@babel/preset-flow"
5 | ]
6 | }
--------------------------------------------------------------------------------
/test/integration/babel/pages/index.js:
--------------------------------------------------------------------------------
1 | // This page is written in flowtype to test Babel's functionality
2 | import * as React from 'react'
3 |
4 | type Props = {}
5 |
6 | export default class MyComponent extends React.Component {
7 | render () {
8 | return Test Babel
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/test/integration/babel/test/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | ["next/babel", {
4 | "preset-env": {
5 | "modules": "commonjs"
6 | }
7 | }]
8 | ]
9 | }
--------------------------------------------------------------------------------
/test/integration/basic/components/hello-chunkfilename.js:
--------------------------------------------------------------------------------
1 | export default () => test chunkfilename
2 |
--------------------------------------------------------------------------------
/test/integration/basic/components/hello-context.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import PropTypes from 'prop-types'
3 |
4 | export default class extends React.Component {
5 | static contextTypes = {
6 | data: PropTypes.object
7 | }
8 |
9 | render () {
10 | const { data } = this.context
11 | return (
12 | {data.title}
13 | )
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/test/integration/basic/components/hello.jsx:
--------------------------------------------------------------------------------
1 | export const Hello = () => (
2 | Hello
3 | )
4 |
--------------------------------------------------------------------------------
/test/integration/basic/components/hello1.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 | Hello World 1
3 | )
4 |
--------------------------------------------------------------------------------
/test/integration/basic/components/hello2.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 | Hello World 2
3 | )
4 |
--------------------------------------------------------------------------------
/test/integration/basic/components/hello3.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 | Hello World 1
3 | )
4 |
--------------------------------------------------------------------------------
/test/integration/basic/components/hello4.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 | Hello World 2
3 | )
4 |
--------------------------------------------------------------------------------
/test/integration/basic/components/hmr/dynamic.js:
--------------------------------------------------------------------------------
1 | export default () => {
2 | return
3 | Dynamic Component
4 |
9 |
10 | }
11 |
--------------------------------------------------------------------------------
/test/integration/basic/components/world.jsx:
--------------------------------------------------------------------------------
1 | export const World = () => (
2 | World
3 | )
4 |
--------------------------------------------------------------------------------
/test/integration/basic/lib/async-function.js:
--------------------------------------------------------------------------------
1 | module.exports = async function () {
2 | return 'test'
3 | }
4 |
--------------------------------------------------------------------------------
/test/integration/basic/lib/data.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Zeit"
3 | }
--------------------------------------------------------------------------------
/test/integration/basic/next.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | onDemandEntries: {
3 | // Make sure entries are not getting disposed.
4 | maxInactiveAge: 1000 * 60 * 60
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/test/integration/basic/pages/custom-encoding.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | export default class extends React.Component {
3 | static async getInitialProps ({res}) {
4 | if (res) {
5 | res.setHeader('Content-Type', 'text/html; charset=iso-8859-2')
6 | }
7 | return {}
8 | }
9 |
10 | render () {
11 | return null
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/test/integration/basic/pages/custom-extension.jsx:
--------------------------------------------------------------------------------
1 | import {World} from '../components/world'
2 | import {Hello} from '../components/hello.jsx'
3 |
4 | export default () => (
5 |
6 | )
7 |
--------------------------------------------------------------------------------
/test/integration/basic/pages/default-head.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Head from 'next/head'
3 |
4 | export default () =>
5 |
6 | next-head, but only once.
7 |
8 |
--------------------------------------------------------------------------------
/test/integration/basic/pages/dynamic/chunkfilename.js:
--------------------------------------------------------------------------------
1 | import dynamic from 'next/dynamic'
2 |
3 | const Hello = dynamic(import(/* webpackChunkName: 'hello-world' */'../../components/hello-chunkfilename'))
4 |
5 | export default Hello
6 |
--------------------------------------------------------------------------------
/test/integration/basic/pages/dynamic/function.js:
--------------------------------------------------------------------------------
1 | import dynamic from 'next/dynamic'
2 |
3 | const Hello = dynamic(() => import('../../components/hello1'))
4 |
5 | export default Hello
6 |
--------------------------------------------------------------------------------
/test/integration/basic/pages/dynamic/index.js:
--------------------------------------------------------------------------------
1 | import Link from 'next/link'
2 |
3 | export default () => (
4 |
7 | )
8 |
--------------------------------------------------------------------------------
/test/integration/basic/pages/dynamic/no-chunk.js:
--------------------------------------------------------------------------------
1 | import dynamic from 'next/dynamic'
2 | import Welcome from '../../components/welcome'
3 |
4 | const Welcome2 = dynamic(import('../../components/welcome'))
5 |
6 | export default () => (
7 |
8 |
9 |
10 |
11 | )
12 |
--------------------------------------------------------------------------------
/test/integration/basic/pages/dynamic/no-ssr-custom-loading.js:
--------------------------------------------------------------------------------
1 | import dynamic from 'next/dynamic'
2 |
3 | const Hello = dynamic(import('../../components/hello1'), {
4 | ssr: false,
5 | loading: () => (LOADING
)
6 | })
7 |
8 | export default Hello
9 |
--------------------------------------------------------------------------------
/test/integration/basic/pages/dynamic/no-ssr.js:
--------------------------------------------------------------------------------
1 | import dynamic from 'next/dynamic'
2 |
3 | const Hello = dynamic(import('../../components/hello1'), { ssr: false })
4 |
5 | export default Hello
6 |
--------------------------------------------------------------------------------
/test/integration/basic/pages/dynamic/ssr-true.js:
--------------------------------------------------------------------------------
1 | import dynamic from 'next/dynamic'
2 |
3 | const Hello = dynamic(import('../../components/hello1'), { ssr: true })
4 |
5 | export default Hello
6 |
--------------------------------------------------------------------------------
/test/integration/basic/pages/dynamic/ssr.js:
--------------------------------------------------------------------------------
1 | import dynamic from 'next/dynamic'
2 |
3 | const Hello = dynamic(import('../../components/hello1'))
4 |
5 | export default Hello
6 |
--------------------------------------------------------------------------------
/test/integration/basic/pages/empty-get-initial-props.js:
--------------------------------------------------------------------------------
1 | const EmptyInitialPropsPage = () => (My Page
)
2 | EmptyInitialPropsPage.getInitialProps = () => null
3 |
4 | export default EmptyInitialPropsPage
5 |
--------------------------------------------------------------------------------
/test/integration/basic/pages/error-in-the-browser-global-scope.js:
--------------------------------------------------------------------------------
1 | if (typeof window !== 'undefined') {
2 | throw new Error('An Expected error occurred')
3 | }
4 |
5 | export default () =>
6 |
--------------------------------------------------------------------------------
/test/integration/basic/pages/error-in-the-global-scope.js:
--------------------------------------------------------------------------------
1 | aa = 10 //eslint-disable-line
2 |
3 | export default () => (
4 | Hello
5 | )
6 |
--------------------------------------------------------------------------------
/test/integration/basic/pages/error-inside-browser-page.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | export default class ErrorInRenderPage extends React.Component {
3 | render () {
4 | if (typeof window !== 'undefined') {
5 | throw new Error('An Expected error occurred')
6 | }
7 | return
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/test/integration/basic/pages/error-inside-page.js:
--------------------------------------------------------------------------------
1 | export default () => {
2 | throw new Error('This is an expected error')
3 | }
4 |
--------------------------------------------------------------------------------
/test/integration/basic/pages/exports.js:
--------------------------------------------------------------------------------
1 | export default () => {
2 | return module.exports
3 | }
4 |
--------------------------------------------------------------------------------
/test/integration/basic/pages/fragment-syntax.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | import React from 'react'
3 |
4 | export default () => <>My component!>
--------------------------------------------------------------------------------
/test/integration/basic/pages/hmr/about.js:
--------------------------------------------------------------------------------
1 | export default () => {
2 | return (
3 |
4 |
5 | This is the about page.
6 |
7 |
8 | )
9 | }
10 |
--------------------------------------------------------------------------------
/test/integration/basic/pages/hmr/contact.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 |
3 |
4 | This is the contact page.
5 |
6 |
7 | )
8 |
--------------------------------------------------------------------------------
/test/integration/basic/pages/hmr/error-in-gip.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | export default class extends React.Component {
3 | static getInitialProps () {
4 | const error = new Error('an-expected-error-in-gip')
5 | throw error
6 | }
7 |
8 | render () {
9 | return (Hello
)
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/test/integration/basic/pages/hmr/index.js:
--------------------------------------------------------------------------------
1 | import Link from 'next/link'
2 |
3 | export default () => (
4 |
7 | )
8 |
--------------------------------------------------------------------------------
/test/integration/basic/pages/hmr/style-dynamic-component.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import dynamic from 'next/dynamic'
3 |
4 | const HmrDynamic = dynamic(import('../../components/hmr/dynamic'))
5 |
6 | export default () => {
7 | return (
8 |
9 | )
10 | }
11 |
--------------------------------------------------------------------------------
/test/integration/basic/pages/index.js:
--------------------------------------------------------------------------------
1 | import CDM from '../lib/cdm'
2 | export default CDM
3 |
--------------------------------------------------------------------------------
/test/integration/basic/pages/json.js:
--------------------------------------------------------------------------------
1 | import data from '../lib/data'
2 |
3 | export default () => (
4 | {data.name}
5 | )
6 |
--------------------------------------------------------------------------------
/test/integration/basic/pages/link.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Link from 'next/link'
3 | export default () => (
4 |
5 | )
6 |
--------------------------------------------------------------------------------
/test/integration/basic/pages/nav/about.js:
--------------------------------------------------------------------------------
1 | import Link from 'next/link'
2 |
3 | export default () => (
4 |
5 |
6 |
Go Back
7 |
8 |
9 |
This is the about page.
10 |
11 | )
12 |
--------------------------------------------------------------------------------
/test/integration/basic/pages/nav/as-path.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | export default class extends React.Component {
4 | static getInitialProps ({ asPath, req }) {
5 | return { asPath }
6 | }
7 |
8 | render () {
9 | return (
10 |
11 | {this.props.asPath}
12 |
13 | )
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/test/integration/basic/pages/nested-cdm/index.js:
--------------------------------------------------------------------------------
1 | import CDM from '../../lib/cdm'
2 | export default CDM
3 |
--------------------------------------------------------------------------------
/test/integration/basic/pages/no-default-export.js:
--------------------------------------------------------------------------------
1 | export default {}
2 |
--------------------------------------------------------------------------------
/test/integration/basic/pages/process-env.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 | {process.env.NODE_ENV}
3 | )
4 |
--------------------------------------------------------------------------------
/test/integration/basic/pages/read-only-object-error.js:
--------------------------------------------------------------------------------
1 | import test from '../lib/async-function'
2 |
3 | function ReadOnlyObjectError () {
4 | return 'this is just a placeholder component'
5 | }
6 |
7 | ReadOnlyObjectError.getInitialProps = async () => {
8 | const result = await test()
9 | return {result}
10 | }
11 |
12 | export default ReadOnlyObjectError
13 |
--------------------------------------------------------------------------------
/test/integration/basic/pages/stateless.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | export default () => My component!
4 |
--------------------------------------------------------------------------------
/test/integration/basic/pages/styled-jsx.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 |
6 | )
7 |
--------------------------------------------------------------------------------
/test/integration/basic/pages/url-prop.js:
--------------------------------------------------------------------------------
1 | export default ({url}) => {
2 | return
3 |
{url.pathname}
4 |
{Object.keys(url.query).length}
5 |
{url.asPath}
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/test/integration/basic/pages/using-asset/index.js:
--------------------------------------------------------------------------------
1 | import Link from 'next/link'
2 |
3 | export default () => (
4 |
9 | )
10 |
--------------------------------------------------------------------------------
/test/integration/basic/pages/with-cdm.js:
--------------------------------------------------------------------------------
1 | import CDM from '../lib/cdm'
2 | export default CDM
3 |
--------------------------------------------------------------------------------
/test/integration/config/.gitignore:
--------------------------------------------------------------------------------
1 | !node_modules
--------------------------------------------------------------------------------
/test/integration/config/components/hello-webpack-css.css:
--------------------------------------------------------------------------------
1 | .helloWorld {
2 | font-size: 100px;
3 | }
4 |
--------------------------------------------------------------------------------
/test/integration/config/components/hello-webpack-css.js:
--------------------------------------------------------------------------------
1 | import css from './hello-webpack-css.css'
2 | import sass from './hello-webpack-sass.scss'
3 | import framework from 'css-framework/framework.css'
4 | export default () => Hello World
5 |
--------------------------------------------------------------------------------
/test/integration/config/components/hello-webpack-sass.scss:
--------------------------------------------------------------------------------
1 | $color: yellow;
2 |
3 | .helloWorldSass {
4 | color: $color;
5 | }
6 |
--------------------------------------------------------------------------------
/test/integration/config/node_modules/css-framework/framework.css:
--------------------------------------------------------------------------------
1 | .frameworkClass {
2 | background: blue
3 | }
--------------------------------------------------------------------------------
/test/integration/config/pages/build-id.js:
--------------------------------------------------------------------------------
1 | export default () => {
2 | return {process.env.CONFIG_BUILD_ID}
3 | }
4 |
--------------------------------------------------------------------------------
/test/integration/config/pages/next-config.js:
--------------------------------------------------------------------------------
1 | import getConfig from 'next/config'
2 | const {serverRuntimeConfig, publicRuntimeConfig} = getConfig()
3 |
4 | export default () =>
5 |
{serverRuntimeConfig.mySecret}
6 |
{publicRuntimeConfig.staticFolder}
7 |
8 |
--------------------------------------------------------------------------------
/test/integration/config/pages/webpack-css.js:
--------------------------------------------------------------------------------
1 | import HelloWebpackCSS from '../components/hello-webpack-css'
2 |
3 | export default () =>
4 |
--------------------------------------------------------------------------------
/test/integration/custom-server/next.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | onDemandEntries: {
3 | // Make sure entries are not getting disposed.
4 | maxInactiveAge: 1000 * 60 * 60
5 | },
6 | generateEtags: process.env.GENERATE_ETAGS === 'true'
7 | }
8 |
--------------------------------------------------------------------------------
/test/integration/custom-server/pages/asset.js:
--------------------------------------------------------------------------------
1 | import asset from 'next/asset'
2 |
3 | export default () => (
4 |
5 |
6 |
7 | )
8 |
--------------------------------------------------------------------------------
/test/integration/custom-server/pages/index.js:
--------------------------------------------------------------------------------
1 | import Link from 'next/link'
2 |
3 | export default () => (
4 |
9 | )
10 |
--------------------------------------------------------------------------------
/test/integration/dist-dir/next.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | onDemandEntries: {
3 | // Make sure entries are not getting disposed.
4 | maxInactiveAge: 1000 * 60 * 60
5 | },
6 | distDir: 'dist'
7 | }
8 |
--------------------------------------------------------------------------------
/test/integration/dist-dir/pages/index.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 | Hello World
3 | )
4 |
--------------------------------------------------------------------------------
/test/integration/export/.gitignore:
--------------------------------------------------------------------------------
1 | .next-dev
2 |
--------------------------------------------------------------------------------
/test/integration/export/components/hello.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 |
3 | Welcome to dynamic imports.
4 |
5 | )
6 |
--------------------------------------------------------------------------------
/test/integration/export/pages/about.js:
--------------------------------------------------------------------------------
1 | import Link from 'next/link'
2 |
3 | export default () => (
4 |
5 |
10 |
This is the About page
11 |
12 | )
13 |
--------------------------------------------------------------------------------
/test/integration/export/pages/asset.js:
--------------------------------------------------------------------------------
1 | import asset from 'next/asset'
2 |
3 | export default () => (
4 |
5 |
6 |
7 | )
8 |
--------------------------------------------------------------------------------
/test/integration/export/pages/button-link.js:
--------------------------------------------------------------------------------
1 | import Link from 'next/link'
2 |
3 | export default () => (
4 |
5 |
6 |
7 | Go Back
8 |
9 |
10 |
This is the About page
11 |
12 | )
13 |
--------------------------------------------------------------------------------
/test/integration/export/pages/get-initial-props-with-no-query.js:
--------------------------------------------------------------------------------
1 | const Page = ({ query }) => (
2 |
3 | { `Query is: ${query}` }
4 |
5 | )
6 |
7 | Page.getInitialProps = ({ query }) => {
8 | return { query: JSON.stringify(query) }
9 | }
10 |
11 | export default Page
12 |
--------------------------------------------------------------------------------
/test/integration/export/pages/level1/about.js:
--------------------------------------------------------------------------------
1 | import Link from 'next/link'
2 |
3 | export default () => (
4 |
5 |
10 |
This is the Level1 about page
11 |
12 | )
13 |
--------------------------------------------------------------------------------
/test/integration/export/pages/level1/index.js:
--------------------------------------------------------------------------------
1 | import Link from 'next/link'
2 |
3 | export default () => (
4 |
5 |
10 |
This is the Level1 home page
11 |
12 | )
13 |
--------------------------------------------------------------------------------
/test/integration/export/pages/query.js:
--------------------------------------------------------------------------------
1 | import { Component } from 'react'
2 |
3 | class Page extends Component {
4 | static getInitialProps ({ query }) {
5 | return { query }
6 | }
7 | render () {
8 | return JSON.stringify(this.props.query, null, 2)
9 | }
10 | }
11 |
12 | export default Page
13 |
--------------------------------------------------------------------------------
/test/integration/filesystempublicroutes/next.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | onDemandEntries: {
3 | // Make sure entries are not getting disposed.
4 | maxInactiveAge: 1000 * 60 * 60
5 | },
6 | useFileSystemPublicRoutes: false,
7 | exportPathMap () {
8 | return {
9 | '/exportpathmap-route': {page: '/exportpathmap-route'}
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/test/integration/filesystempublicroutes/pages/exportpathmap-route.js:
--------------------------------------------------------------------------------
1 | export default () => exportpathmap was here
2 |
--------------------------------------------------------------------------------
/test/integration/filesystempublicroutes/pages/index.js:
--------------------------------------------------------------------------------
1 | export default () => Index
2 |
--------------------------------------------------------------------------------
/test/integration/lambdas/next.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | onDemandEntries: {
3 | // Make sure entries are not getting disposed.
4 | maxInactiveAge: 1000 * 60 * 60
5 | },
6 | lambdas: true
7 | }
8 |
--------------------------------------------------------------------------------
/test/integration/lambdas/pages/index.js:
--------------------------------------------------------------------------------
1 | import Link from 'next/link'
2 | export default () => {
3 | return
9 | }
10 |
--------------------------------------------------------------------------------
/test/integration/ondemand/components/hello.js:
--------------------------------------------------------------------------------
1 | export default () => Hello
2 |
--------------------------------------------------------------------------------
/test/integration/ondemand/next.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | onDemandEntries: {
3 | maxInactiveAge: 1000 * 5
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/test/integration/ondemand/pages/about.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 |
5 | )
6 |
--------------------------------------------------------------------------------
/test/integration/ondemand/pages/index.js:
--------------------------------------------------------------------------------
1 | import Link from 'next/link'
2 |
3 | export default () => (
4 |
8 | )
9 |
--------------------------------------------------------------------------------
/test/integration/ondemand/pages/nav/dynamic.js:
--------------------------------------------------------------------------------
1 | import dynamic from 'next/dynamic'
2 |
3 | const Hello = dynamic(import('../../components/hello.js'))
4 |
5 | export default () =>
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/integration/ondemand/pages/nav/index.js:
--------------------------------------------------------------------------------
1 | import Link from 'next/link'
2 |
3 | export default () =>
8 |
--------------------------------------------------------------------------------
/test/integration/ondemand/pages/third.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 |
5 | )
6 |
--------------------------------------------------------------------------------
/test/integration/page-extensions/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | "next/babel",
4 | "@zeit/next-typescript/babel"
5 | ]
6 | }
--------------------------------------------------------------------------------
/test/integration/page-extensions/next.config.js:
--------------------------------------------------------------------------------
1 | const withTypescript = require('@zeit/next-typescript')
2 | module.exports = withTypescript({
3 | onDemandEntries: {
4 | // Make sure entries are not getting disposed.
5 | maxInactiveAge: 1000 * 60 * 60
6 | }
7 | })
8 |
--------------------------------------------------------------------------------
/test/integration/page-extensions/test/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | ["next/babel", {
4 | "preset-env": {
5 | "modules": "commonjs"
6 | }
7 | }]
8 | ]
9 | }
--------------------------------------------------------------------------------
/test/integration/production-config/styles.css:
--------------------------------------------------------------------------------
1 | p {
2 | font-size: 40px;
3 | color: red;
4 | }
--------------------------------------------------------------------------------
/test/integration/production/components/hello-context.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import PropTypes from 'prop-types'
3 |
4 | export default class extends React.Component {
5 | static contextTypes = {
6 | data: PropTypes.object
7 | }
8 |
9 | render () {
10 | const { data } = this.context
11 | return (
12 | {data.title}
13 | )
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/test/integration/production/components/hello1.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 | Hello World 1
3 | )
4 |
--------------------------------------------------------------------------------
/test/integration/production/components/hello2.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 | Hello World 2
3 | )
4 |
--------------------------------------------------------------------------------
/test/integration/production/info.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "cool-version"
3 | }
4 |
--------------------------------------------------------------------------------
/test/integration/production/next.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | onDemandEntries: {
3 | // Make sure entries are not getting disposed.
4 | maxInactiveAge: 1000 * 60 * 60
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/test/integration/production/pages/about.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 | About Page
3 | )
4 |
--------------------------------------------------------------------------------
/test/integration/production/pages/dynamic/index.js:
--------------------------------------------------------------------------------
1 | import Link from 'next/link'
2 |
3 | export default () => (
4 |
7 | )
8 |
--------------------------------------------------------------------------------
/test/integration/production/pages/dynamic/no-chunk.js:
--------------------------------------------------------------------------------
1 | import dynamic from 'next/dynamic'
2 | import Welcome from '../../components/welcome'
3 |
4 | const Welcome2 = dynamic(import('../../components/welcome'))
5 |
6 | export default () => (
7 |
8 |
9 |
10 |
11 | )
12 |
--------------------------------------------------------------------------------
/test/integration/production/pages/dynamic/no-ssr-custom-loading.js:
--------------------------------------------------------------------------------
1 | import dynamic from 'next/dynamic'
2 |
3 | const Hello = dynamic(import('../../components/hello1'), {
4 | ssr: false,
5 | loading: () => (LOADING
)
6 | })
7 |
8 | export default Hello
9 |
--------------------------------------------------------------------------------
/test/integration/production/pages/dynamic/no-ssr.js:
--------------------------------------------------------------------------------
1 | import dynamic from 'next/dynamic'
2 |
3 | const Hello = dynamic(import('../../components/hello1'), { ssr: false })
4 |
5 | export default Hello
6 |
--------------------------------------------------------------------------------
/test/integration/production/pages/dynamic/ssr-true.js:
--------------------------------------------------------------------------------
1 | import dynamic from 'next/dynamic'
2 |
3 | const Hello = dynamic(import('../../components/hello1'), { ssr: true })
4 |
5 | export default Hello
6 |
--------------------------------------------------------------------------------
/test/integration/production/pages/dynamic/ssr.js:
--------------------------------------------------------------------------------
1 | import dynamic from 'next/dynamic'
2 |
3 | const Hello = dynamic(import('../../components/hello1'))
4 |
5 | export default Hello
6 |
--------------------------------------------------------------------------------
/test/integration/production/pages/error-in-browser-render.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | export default class ErrorInRenderPage extends React.Component {
3 | render () {
4 | if (typeof window !== 'undefined') {
5 | throw new Error('An Expected error occured')
6 | }
7 | return
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/test/integration/production/pages/error-in-ssr-render.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | export default class ErrorInRenderPage extends React.Component {
3 | render () {
4 | throw new Error('An Expected error occured')
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/test/integration/production/pages/finish-response.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react'
2 |
3 | export default class extends Component {
4 | static getInitialProps ({ res }) {
5 | res.end('hi')
6 | }
7 |
8 | render () {
9 | return hi
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/test/integration/production/pages/index.js:
--------------------------------------------------------------------------------
1 | import Link from 'next/link'
2 |
3 | export default () => (
4 |
8 | )
9 |
--------------------------------------------------------------------------------
/test/integration/production/pages/process-env.js:
--------------------------------------------------------------------------------
1 |
2 | if (process.browser) {
3 | global.__THIS_SHOULD_ONLY_BE_DEFINED_IN_BROWSER_CONTEXT__ = true
4 | }
5 |
6 | if (!process.browser) {
7 | global.__THIS_SHOULD_ONLY_BE_DEFINED_IN_SERVER_CONTEXT__ = true
8 | }
9 |
10 | export default () => (
11 | {process.env.NODE_ENV}
12 | )
13 |
--------------------------------------------------------------------------------
/test/integration/production/static/data/item.txt:
--------------------------------------------------------------------------------
1 | item
--------------------------------------------------------------------------------
/test/integration/size-limit/pages/about.js:
--------------------------------------------------------------------------------
1 | export default () => (
2 |
3 | About
4 |
5 | )
6 |
--------------------------------------------------------------------------------
/test/integration/size-limit/pages/index.js:
--------------------------------------------------------------------------------
1 | import Link from 'next/link'
2 |
3 | export default () => (
4 |
5 | Size-Limit Page
6 |
7 |
about
8 |
9 | )
10 |
--------------------------------------------------------------------------------
/test/integration/with-router/pages/b.js:
--------------------------------------------------------------------------------
1 | import * as React from 'react'
2 |
3 | class PageB extends React.Component {
4 | render () {
5 | return (
6 |
9 | )
10 | }
11 | }
12 |
13 | export default PageB
14 |
--------------------------------------------------------------------------------
/test/isolated/_resolvedata/.gitignore:
--------------------------------------------------------------------------------
1 | !dist
--------------------------------------------------------------------------------
/test/isolated/_resolvedata/aa/index.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oddcommit/Next-All-App/ae33f3f6a81ae352236b816db23b992b3d8e7831/test/isolated/_resolvedata/aa/index.js
--------------------------------------------------------------------------------
/test/isolated/_resolvedata/bb/index.json:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oddcommit/Next-All-App/ae33f3f6a81ae352236b816db23b992b3d8e7831/test/isolated/_resolvedata/bb/index.json
--------------------------------------------------------------------------------
/test/isolated/_resolvedata/cc/index.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oddcommit/Next-All-App/ae33f3f6a81ae352236b816db23b992b3d8e7831/test/isolated/_resolvedata/cc/index.js
--------------------------------------------------------------------------------
/test/isolated/_resolvedata/cc/index.json:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oddcommit/Next-All-App/ae33f3f6a81ae352236b816db23b992b3d8e7831/test/isolated/_resolvedata/cc/index.json
--------------------------------------------------------------------------------
/test/isolated/_resolvedata/one.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oddcommit/Next-All-App/ae33f3f6a81ae352236b816db23b992b3d8e7831/test/isolated/_resolvedata/one.js
--------------------------------------------------------------------------------
/test/isolated/_resolvedata/one.json:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oddcommit/Next-All-App/ae33f3f6a81ae352236b816db23b992b3d8e7831/test/isolated/_resolvedata/one.json
--------------------------------------------------------------------------------
/test/isolated/_resolvedata/server/pages-manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "/index": "static/development/pages/index.js",
3 | "/world": "static/development/pages/world.js",
4 | "/_error": "static/development/pages/_error.js",
5 | "/non-existent-child": "static/development/pages/non-existent-child.js"
6 | }
7 |
--------------------------------------------------------------------------------
/test/isolated/_resolvedata/server/static/development/pages/_error.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | test: 'error'
3 | }
4 |
--------------------------------------------------------------------------------
/test/isolated/_resolvedata/server/static/development/pages/index.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | test: 'hello'
3 | }
4 |
--------------------------------------------------------------------------------
/test/isolated/_resolvedata/server/static/development/pages/non-existent-child.js:
--------------------------------------------------------------------------------
1 | const nonExistent = require('./non-existent-module')
2 | module.exports = {
3 | test: nonExistent
4 | }
5 |
--------------------------------------------------------------------------------
/test/isolated/_resolvedata/server/static/development/pages/world.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | test: 'world'
3 | }
4 |
--------------------------------------------------------------------------------
/test/isolated/_resolvedata/two.json:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oddcommit/Next-All-App/ae33f3f6a81ae352236b816db23b992b3d8e7831/test/isolated/_resolvedata/two.json
--------------------------------------------------------------------------------
/test/isolated/_resolvedata/with-function/next.config.js:
--------------------------------------------------------------------------------
1 | module.exports = (phase, {defaultConfig}) => {
2 | return {
3 | phase,
4 | defaultConfig,
5 | customConfig: true
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/test/isolated/_resolvedata/without-function/next.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | customConfig: true
3 | }
4 |
--------------------------------------------------------------------------------
/test/jest-global-setup.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 |
3 | const chromedriver = require('chromedriver')
4 | const waitPort = require('wait-port')
5 |
6 | module.exports = async function globalSetup () {
7 | chromedriver.start()
8 |
9 | // https://github.com/giggio/node-chromedriver/issues/117
10 | await waitPort({
11 | port: 9515,
12 | timeout: 1000 * 60 * 2 // 2 Minutes
13 | })
14 | }
15 |
--------------------------------------------------------------------------------
/test/jest-global-teardown.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 |
3 | const chromedriver = require('chromedriver')
4 |
5 | module.exports = async function globalSetup () {
6 | chromedriver.stop()
7 | }
8 |
--------------------------------------------------------------------------------