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

32 commits

Author SHA1 Message Date
Arunoda Susiripala 24f3f143a6 Introduce "asPath" into router and getInitialProps (#1857)
* Add asPath to next/router and getInitialProps context.

* Add test cases.

* Update docs.

* Build as-path pages before they use.
2017-05-03 09:40:09 -07:00
Craig Mulligan a903503d41 Update readme.md (#1818) 2017-04-27 18:51:50 +05:30
Ben Hadfield 0210540b8f Fixed typo in README (#1784)
In Shallow Routing, the line `Since that's a new page, it'll unload the current page, load the new one and call `getInitialProps` even we asked to do shallow routing.` is missing the word `though`.
2017-04-26 13:24:46 +02:00
Arunoda Susiripala dec85fe6c4 Add CDN support with assetPrefix (#1700)
* Introduce script tag based page loading system.

* Call ensurePage only in the dev mode.

* Implement router using the page-loader.

* Fix a typo and remove unwanted code.

* Fix some issues related to rendering.

* Fix production tests.

* Fix ondemand test cases.

* Fix unit tests.

* Get rid of eval completely.

* Remove all the inline code.

* Remove the json-pages plugin.

* Rename NEXT_PAGE_LOADER into __NEXT_PAGE_LOADER__

* Rename NEXT_LOADED_PAGES into __NEXT_LOADED_PAGES__

* Remove some unwanted code.

* Load everything async.

* Remove lib/eval-script.js
We no longer need it.

* Move webpack idle wait code to the page-loader.
Because that's the place to do it.

* Remove pageNotFound key from the error.

* Remove unused error field 'buildError'

* Add much better logic to normalize routes.

* Get rid of mitt.

* Introduce a better way to register pages.

* Came back to the mitt() based page-loader.

* Add link rel=preload support.

* Add assetPrefix support to add support for CDNs.

* Add assetPrefix support for preload links.

* Update readme.md
2017-04-17 21:18:43 -07:00
Xavier Brown bdc30bc089 Update readme.md (#1741)
The link element in the example code didn't end its first bracket before <a>
2017-04-17 09:00:12 +05:30
Jaga Santagostino 2103e0541b remove roadmap to 2.0 (#1711)
2.0 is already released
2017-04-13 20:43:30 +05:30
Arunoda Susiripala e054430026 Fix a typo 2017-04-13 20:32:05 +05:30
Jaga Santagostino a52458181a Add learnnextjs link (#1710)
* Add learnnextjs link

* fix typos
2017-04-13 16:43:06 +02:00
alex newman 9347c8bdd0 Specify a different build directory for #1513 (#1599)
* Update references to `.next`

* Remove console logs and extraneous semi colons

* Remove lint errors

* Update references to .next and update docs

* Update options from nested to flat with `distDir`

* Add integration tests, and update `.gitignore`

* Rename integration folder to dist-dir to match standards
2017-04-06 15:39:26 +05:30
Kevin Donahue 191d65889b Fix typo in Shallow Routing doc (#1593) 2017-04-02 09:28:39 +02:00
Dan Zajdband 7699cbe9df Add/readme example stateless lifecycle (#1558)
* Using developit/unfetch as the Fetch API polyfill

* Added a stateless component with getInitialProps in the readme.

* Fixed typo
2017-03-30 03:41:18 +05:30
Izzy Vivian Dupree 6cd6c2ef74 readme: show how to npm run dev on another port. (#1544) 2017-03-28 22:27:21 +02:00
Mike Bannister 6ac6b992b0 Revive truncated text in readme (#1538) 2017-03-28 18:22:25 +02:00
Arunoda Susiripala 296478b1cc Remove master vs README warnning 2017-03-27 19:53:25 +05:30
Dominik Sumer 85bcfb864e fixed zeit.co link in readme (#1497) 2017-03-25 01:20:56 +05:30
Will Djingga 13ccf78498 Fix typo in README (#1427)
`routing`not `routig`
2017-03-15 13:24:34 +01:00
Arunoda Susiripala fbc6c47e86 Fix deployment wiki link. 2017-03-15 08:10:10 +05:30
Tim Neutkens 9acc7cfc68 Add reference to deployment wiki page (#1423) 2017-03-15 08:08:00 +05:30
Tim Neutkens 228bbbef74 Use jsonPageRes instead of xhr (#1424) 2017-03-15 08:07:29 +05:30
Dan Zajdband d92ab55d22 Add/link replace (#1419)
* Using developit/unfetch as the Fetch API polyfill

* Added the replace prop into the Link component

* Added integration test for replace prop on Link component
2017-03-14 18:06:34 -05:00
Sergio Daniel Xalambrí 38822717a9 Add support for URL objects in Link and Router (#1345)
* Add support for URL objects in Link and Router

* Fix typo in comment

* Fix possible bug if the `href` prop is `null`

* Document the usage of URL objects in Link and Router

* Update readme.md

* Parse URL to get the host & hostname in `isLocal`

This should check if the current location and the checked URL have the same `host` or `hostname`.

* Format `as` parameter from object to string if required

* Format `href` and `as` inside the construct and componentWillReceiveProps

* Use `JSON.stringify` to compare objects

* Add usage example

* chore(package): update chromedriver to version 2.28.0 (#1386)

https://greenkeeper.io/

* Refactor the codebase a bit.

* Change the example name.

* Add a few test cases.

* Add the example to the README.
2017-03-12 09:27:51 +05:30
Arunoda Susiripala 6db7101c40 Add beforeHistoryChange router event. (#1360) 2017-03-08 08:30:47 -08:00
Guillermo Rauch 4cc24e4c2a Update readme.md 2017-03-06 08:51:19 -08:00
Arunoda Susiripala f8f3fa7dce Introducing Shallow Routing (#1357)
* Simplify route info handling.

* Add basic resolve=false support.

* Make sure to render getInitialProps always if it's the first render.

* Change resolve=false to shallow routing.

* Add test cases for shallow routing.

* Update README for shallow routing docs.

* Update docs.

* Update docs.

* Update docs.
2017-03-06 08:48:35 -08:00
Arunoda Susiripala 2aa9586052 Update prefetch docs and mention it's production only. (#1324) 2017-03-01 22:24:41 +05:30
Tim Neutkens e1babdfe9d Render styled-jsx in _document example (#1287) 2017-02-28 05:15:49 +05:30
Marshall Bowers 8a6c57de00 Add better documentation around url.parse (#1281) 2017-02-25 19:35:10 +01:00
Arunoda Susiripala 0bd250f4aa Handle BUILD_ID mismatch error (#1224)
* Reload the page if the buildIds are mismatch.

* Reload the browser with main.js and commons.js buildId mismatch.

* Implement proper reloading with an API to persist the state.

* Add some tests for force reload.

* Change _reload to _forceReload.

* Add a section about reload hooks to the README.

* Allow to add a hook to handle BUILD_ID mismatch.

* Remove readme docs.

* Do not show a custom error to the user.

* Cancel the routing when there's a BUILD_ID mismatch.

* Fix a typo.

* Passing route to SingletonRouter.onBuildIdMismatch

* Handle buildId mismatch automatically.
2017-02-20 15:48:17 -08:00
Tim Neutkens 310f430963 Rename next/prefetch to <Next prefetch> in docs (#1206) 2017-02-19 23:56:33 +09:00
Tim Neutkens 45de5b8374 Lowercase file name (#1190) 2017-02-17 14:36:47 +01:00
Emil Bruckner d30363800d Fix link to contributing.md (#1188)
CONTRIBUTING.md -> 404
2017-02-17 14:32:56 +01:00
Leo Lamprecht 70f02ea8af
Lowercased text files 2017-02-16 23:54:22 +01:00
Renamed from README.md (Browse further)