1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00
Commit graph

173 commits

Author SHA1 Message Date
Albin Ekblom d8be2a0379 Add example of process.env runtimeConfig (#4759) 2018-07-11 12:48:14 +02:00
Jacob Page d51245b877 Improve documentation on runtime configuration (#4756)
* Remove nesting of runtime configuration under the babel section, since it's not related to babel.
* Clean up confusing verbiage relating to "keys."
2018-07-10 23:02:45 +02:00
Jacob Page 498f37e33f Support events emitter for router (#4726)
Fixes #4679 
* Document usage of `events` router property
* Expose `events` in the `router` context object
2018-07-05 14:41:18 +02:00
Kelly Burke e70c59517b Add example to Recipes section (#4661) 2018-06-25 12:31:09 +02:00
Tim Neutkens 3ae9f877a9
Rephrase url deprecation text and add link to next-codemod (#4649)
* Rephrase url deprecation text and add link to next-codemod

* Clean up double words
2018-06-22 14:21:28 +02:00
Tim Neutkens 6cba9fa511
Remove the React 15 support comment (#4648)
Next.js supports React 15 / React-like alternatives that don’t have the `rehydrate` method (preact) again since Next.js 5+. It’s still not recommended to use React 15. But there’s no need to mention that here as this is the initial installation and we instruct the user to install the latest version of React.
2018-06-22 11:53:15 +02:00
Tim Neutkens fc2d59de4d
Add class properties configuration (#4619) 2018-06-19 21:48:54 +02:00
Tim Neutkens f2c2519159
Move build directory outside of server folder (#4565)
The prepares for next-server.

I also took this as an opportunity to get all build directory paths from a single location, as they were previously scattered across webpack/babel plugins and loaders.
2018-06-14 19:30:14 +02:00
Andrew McLagan 2c4a5739a1 Update README.md to include browser support and polyfills docs (#4601)
Fixes #4572

This PR intends to address https://github.com/zeit/next.js/issues/4572 around documenting browser support and what needs polyfills.

There are many outstanding issues on the tracker regarding browser support and polyfills. This may alleviate some of them.
2018-06-14 12:39:13 +02:00
Tim Neutkens 5bc3b23c23
Make router properties update when re-rendering (#4541)
* Make router properties update when re-rendering

* Remove documentation about methods that have been deprecated since v2/v3

* Update next export documentation
2018-06-05 17:10:28 +02:00
andy-viv 2b16d8b2ac added "hashChangeStart" and "hashChangeComplete" events (#4234)
This PR adds events for when there is a hash-only change in the URL. This is needed because `window.addEventListener('hashchange', ...)` does not work with next.js because it is using pushState.
2018-05-25 14:47:58 +02:00
Tim Neutkens 4e8009c107 Add section to the readme about configuring .babelrc 2018-05-25 14:39:37 +02:00
Robin Wieruch 2c3e8d3201 Improve route prefetch docs: add client side imperative code (#4213)
I stumbled into this Issue https://github.com/zeit/next.js/issues/2868 and thought it should be mentioned properly in the documentation.
2018-05-25 14:26:45 +02:00
Timothy Vernon a806c16713 Clarify documentation regarding the static folder (#4340) 2018-05-25 13:42:19 +02:00
Tim Neutkens 13cf9429f7 Remove note about exportPathMap not being supported in development 2018-05-16 21:16:26 +02:00
Gökay Gürcan 121f6c2801 docs: add missing fat arrow (#4245) 2018-05-01 13:12:16 -07:00
Raven 9578e9f9d8 Update link to new learning page (#4223) 2018-04-29 10:55:19 -07:00
Tim Neutkens 0daf9beedc Add _app layout example 2018-04-24 12:31:26 -07:00
Tim Neutkens e6b5567b20 Update url for componentDidCatch 2018-04-23 15:16:30 -07:00
ninesalt 23716d4487 Fix grammatical errors in readme.md (#4199) 2018-04-23 11:17:27 -07:00
Tim Neutkens a691dd06cf State is no longer used since #4156 2018-04-18 21:39:57 +02:00
Tim Phillips f6949349c1 Link to popstate doc on MDN (#4150) 2018-04-13 12:29:35 +02:00
Christian Nwamba 09e5064821 Fixed typo (#4144)
which allows you can -> which allows you to
2018-04-12 10:40:32 +02:00
Tim Neutkens eca8e8f64b
Expose app.js (#4129)
* Expose pages/_app.js

* Add tests for _app and _document

* Uncomment deprecation warnings

* Add documentation for _app, improve documentation of _document

* Update docs / test for _document

* Add _document to client compiler in development

* Add missing app.js to comment

* Only warn once

* Add url-deprecated error page

* Combine tests

* Yse same message for all methods of ‘props.url’

* Update docs around _app

* Update documentation

* Quotes

* Update table of contents
2018-04-12 10:33:22 +02:00
Tim Neutkens 15dde33794
Add build manifest (#4119)
* Add build manifest

* Split out css since they don’t have exact name

* Remove pages map

* Fix locations test

* Re-run tests

* Get consistent open ports

* Fix static tests

* Add comment about Cache-Control header
2018-04-12 09:47:42 +02:00
Tobias Timm b393833aea Update doc for @zeit/next-stylus (#4107) 2018-04-04 13:18:28 +02:00
Craig McNamara 7f335cb032 Allow BUILD_ID to be set using generateBuildId (minor) (#3873)
* Allow BUILD_ID to be set in the environment

This makes multi server deploys with Capistrano possible.

* next.config.js generateBuildId support

enable customising the build id via config

* Provide default for generateBuildId

* This is not used
2018-03-31 16:34:52 +02:00
George Pantazis 085b2f806a Add Router method to execute custom logic before popstate events (#3956)
* Add router method to inject code before popstate events

* Default _beforePopState, return true

* Fix link in README

* Re-order `if` statements per feedback
2018-03-31 16:21:51 +02:00
Tim Phillips 7e67152232 clarify .next in .gitignore text (#4087) 2018-03-31 08:14:54 +02:00
Tim Neutkens e90f89633c
Add flow, pages-manifest.json, defaultPathMap for export (minor) (#4066)
* Initial implementation of next export without exportPathMap

* Shorter message

* Set up flow

* Create pages manifest

* Use pagesManifest for next export

* Fix tests

* Document defaultPathMap

* Replacing the path is no longer needed

* Use posix normalize for consistent behaviour

* Remove second instance of examples

* Add comment about what pages-manifest does

* Make windows path a route
2018-03-30 15:08:09 +02:00
Carlo Palinckx 136dabc51d fixed small readme typo (#4083) 2018-03-30 14:02:36 +02:00
Tim Neutkens 341c34d4bf Move getConfig message to the line above in readme 2018-03-29 10:19:21 +02:00
Tim Neutkens cfe748d4b5 Add note about getConfig 2018-03-29 10:17:44 +02:00
moondef 7cf9199a5f Add alt attributes to examples in readme.md (#4053) 2018-03-25 12:43:36 +02:00
Tim Neutkens e1a0f18a92 Add note about _document being only server side 2018-03-23 13:50:52 +01:00
Igor Toporet b13410525a Update readme (do not mention specific version) (#4038)
* Update readme for Next 5

* remove specific version mention
2018-03-23 09:24:42 +01:00
Jeffrey Young f0308687c1 fix mistake in docs (#4013) 2018-03-15 10:30:29 +05:30
Oscar Martinez eff27bdcfb Allow etags to be disabled with config option (#3915)
* Allow etags to be disabled with config option

- CR Change: Rename option to generateEtags
- CR Change: Add tests for etag generation
- CR Change: Refactor to use next.config.js
- Update documentation

* Use renderOpts instead of passing nextConfig
2018-03-13 14:18:59 +01:00
Leo Lamprecht b02e5849e9 Show only Spectrum link 2018-03-10 20:34:07 -08:00
Jimmy Moon 84493a67b3 Update readme.md (#3957)
Update readme for scroll props related to #3950
2018-03-07 08:38:11 +01:00
Fabio Espinosa 23c3ef88c9 Small grammar mistake (#3930)
"Let's assume we've another page called..." correct way to say it is "we have". Just a small correction.
2018-03-04 16:09:05 +01:00
Max Stoiber fd7cb2a804 Add Spectrum badge (#3927)
🙌
2018-03-03 15:51:15 +01:00
Tim Neutkens 802e879d33
Implement new next/config keys (#3909) 2018-02-27 17:50:14 +01:00
Bryan Smith ba226c2d26 Fix typo in documentation. (#3907) 2018-02-27 09:36:49 +01:00
Tim Neutkens 1aade36f13
Exposing configuration to the server / client side (minor) (#3882)
* Add next/config

* Set config on server start / client render

* Add documentation for next/config

* Add next/config support for next export

* Fix test

* Use the correct name

* Set default to empty object on the client side

* Add config tests

* Rename config to runtimeConfig
2018-02-26 12:03:27 +01:00
Tim Neutkens 5017f91d23 Allow next.config.js to export a function (#3867)
* Allow next.config.js to export a function

* Expose phases to the configuration function

* Use same value as variable name

* Add next/constants

* Add documentation for config function / phases

* Add constants.js to npm bundle
2018-02-23 19:12:06 +05:30
Arunoda Susiripala a32b22bb2d
Remove special error script handling (#3849)
* Remove special error script handling.
As a result of that, we can't detect 500 errors and buildIdMismatch via client side.

* Fix failing test cases.

* Refactor the code base.

* Remove Router.onAppUpdated
2018-02-21 23:11:25 +05:30
Olivier Tassinari 27f70839eb ⚠️ prefetch is a production only feature ⚠️ (#3851)
I was wondering why I couldn't see the prefetch network request.
Turns out I wasn't forwarding the property to the next router nor I was running the application in production.
2018-02-20 14:24:51 +01:00
djskinner 0e044828ea Add example of next-plugin composition (#3800)
* Add example of next-plugin composition

* Add require statements to the example
2018-02-16 10:59:55 +01:00
Juan Caicedo a7741341cb Fix links for next css (#3820) 2018-02-16 08:41:40 +01:00