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

82 commits

Author SHA1 Message Date
Arunoda Susiripala 141c045c68 Make next/router a client only API. (#443)
* Prevent using 'next/router' APIs inside 'getInitialProps'

* Remove incorrect documentation.

* Make next/router a client only API.
2016-12-20 09:27:43 -08:00
Arunoda Susiripala 22776c2eee Implement the Singleton Router API (#429)
* Immplement the initial singleton Router.

* Use the new SingletonRouter for HMR error handling.

* Use SingletonRouter inside the Link.

* Create an example app using the Router.

* Make the url parameter optional in Router.push and Router.replace

* Add a section about next/router in the README.
2016-12-19 06:40:26 -08:00
Arunoda Susiripala b62a0e8f55 Bundle all the modules inside the app (#414)
* Remove the use of CDN and bundle everything inside the app.
We still pre-build the prefetcher because it needs
different webpack config which only targets browsers
supports Service Workers.

* Remove cdn config item.
We no longer using it.

* Stop adding script tags when staticMarkup=true

* Remove babel-plugin-transform-remove-strict-mode NPM module.
2016-12-17 17:49:10 +09:00
Naoyuki Kanezawa 1708222381 Programmatic API (#310)
* add 'next' api

* add render APIs

* add 'as' prop to Link

* check Accept header to serve json response

* check if response was finished on getInitialProps call

* move server/app to server/index

* load webpack-hot-middleware-client by absolute path

* server: options for testing

* add tests

* example: improve

* server: make dir optional

* fix client routing

* add parameterized routing example

* link: fix display url

* Add custom-server-express example (#352)

* Add custom-server-express example

* Remove extraneous nexts in express routes defs

* Update next config in server.js

* Handle accept headers totally inside Next.js (#385)

* Handle accept headers totally inside Next.js
Now user doesn't need to handle it anymore.

* Move json pages serving to /_next/pages base path.

* Join paths correctly.

* remove next/render
2016-12-16 12:33:08 -08:00
Naoyuki Kanezawa 8ddafaea5c custom document support (#405) 2016-12-16 10:42:40 -08:00
Naoyuki Kanezawa c7ba914f52 Handle runtime errors (#268)
* display runtime errors by error-debug

* server: fix status

* render Error component on client error

* server: render runtime errors of error template

* server: handle errors of error template on render404

* server: add a comment

* server: refactor renderJSON

* recover from runtime errors

* _error: check if xhr exists

* _error: improve client error

* _error: improve error message
2016-11-24 23:03:16 +09:00
zpnk e0455823a0 Add default utf-8 charset. (#270) 2016-11-17 15:06:54 -08:00
Naoyuki Kanezawa e775721f34 Hot reload error page (#190)
* add detach-plugin

* detach-plugin: remove unused property

* watch-pages-plugin: replace _error.js when user defined one was added/removed

* dynamic-entry-plugin: delete cache

* fix HMR settings for _error.js

* render: pass error only on dev

* hot-reload: enable to hot-reload error page

* server: check if /_error has compilation errors

* webapck-dev-client: fix reloading /_error
2016-11-04 00:12:37 +09:00
Naoyuki Kanezawa 93d856706b add cdn config (#111) 2016-10-28 23:38:24 +09:00
Dan Zajdband e164074f8e Added glamor css (#38)
* Added glamor css

* Using pseudoclasses instead of calling functions

* Updated readme using style instead of default import for css
2016-10-21 09:39:20 -07:00
nkzawa ec774a39da refactor paths 2016-10-19 21:58:08 +09:00
nkzawa 2e2db37ccb add error page for debug 2016-10-19 21:41:45 +09:00
nkzawa fb6f5d4382 change build directories structure 2016-10-17 12:55:09 +09:00
nkzawa 1be8447a26 Merge branch 'master' into add/hot-reload 2016-10-17 11:10:16 +09:00
Dan Zajdband 1477734211 Added linting using standard (#27)
* Added linting using standard

* Linting on test
2016-10-16 17:00:17 -07:00
Dan Zajdband 7a331084dc Reverting default props for errors. (#12) 2016-10-16 15:44:26 -07:00
Dan Zajdband e527098bb9 Implemented missing pieces for overriding 404 and 500 pages. (#10) 2016-10-15 17:36:54 -05:00
nkzawa 3032ade283 write assets to disk 2016-10-16 04:49:42 +09:00
nkzawa 26e6193a97 hot-reload: initial 2016-10-15 00:05:08 +09:00
nkzawa 4f21383e0f improve render 2016-10-10 13:24:30 +09:00
nkzawa 3e721b6878 apply css on server rendering 2016-10-09 18:50:41 +09:00
nkzawa 6718b05347 add _error.js, fix error handlings 2016-10-09 18:25:38 +09:00
nkzawa 429668b464 improve resolving files, cache files 2016-10-08 21:01:58 +09:00
nkzawa 22bf51bbe0 support getInitialProps 2016-10-08 19:16:22 +09:00
nkzawa e2ab55ad23 fix client/router 2016-10-08 14:12:51 +09:00
nkzawa 89f96cc160 support next/head 2016-10-07 10:57:31 +09:00
nkzawa 88b01e0a72 next-dev 2016-10-06 20:05:52 +09:00
nkzawa 66b224ad26 server: render .json urls 2016-10-06 16:06:55 +09:00
Naoyuki Kanezawa 22cfcf5357 Merge pull request #1 from zeit/add/css
Added css using aphrodite
2016-10-06 12:30:07 +09:00
Dan Zajdband 7a39dac8c7 Added css using aphrodite 2016-10-05 22:42:55 -04:00
nkzawa ebb7bc5fbc render: fix bundle path 2016-10-06 10:21:15 +09:00
nkzawa 9b06a22f31 initial source 2016-10-06 08:52:50 +09:00