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

685 commits

Author SHA1 Message Date
Arunoda Susiripala 14c86bef1d Introduce a simple prefetching solution (#957)
* Implement a very simple prefetching solution.

* Remove next-prefetcher.

* Require 'whatwg-fetch' only in the client.

* Use xhr in the code.

* Use a simple fetching solution.

* Fix 404 and xhr status issue.

* Move the prefetching implementation to next/router.

* Add deprecated warnning for next/prefetch

* Run only 2 parellel prefetching request at a time.

* Change xhr to jsonPageRes.

* Improve the prefetching logic.

* Add unit tests covering the Router.prefetch()

* Update examples to use the new syntax.

* Update docs.

* Use execOnce() to manage warn printing.

* Remove prefetcher building from the flyfile.js
Because, we no longer use it.
2017-02-15 14:22:22 +05:30
Eric Zingeler d382e4db9a replace location.origin usage with new utils/getLocationOrigin (#1142) 2017-02-15 14:01:19 +05:30
Naoyuki Kanezawa 437fb2cbd3 Copy all properties and descriptors when patching React (#1101)
* patch-react: copy non-enumerable properties and descriptors

* fix syntax error

* remove getOwnPropertyDescriptors polyfil
2017-02-15 08:30:39 +05:30
Tim Neutkens 2c85b367ce Add notice about getInitialProps (#1140)
* Add notice about getInitialProps

* Remove extra whitespace
2017-02-15 08:28:13 +05:30
Thomas Lindstrøm acc1983f80 Don't delete .next folder before a replacement is built (#1139) 2017-02-14 20:14:30 -03:00
greenkeeper[bot] 3766cd0013 fix(package): update babel-runtime to version 6.23.0 (#1136)
https://greenkeeper.io/
2017-02-15 04:31:50 +09:00
Sébastien Dubois 3c7237169f ssr-caching: document way to configure cache key (#1133)
* ssr-caching: document way to configure cache key

* simplify comment
2017-02-14 22:01:50 +05:30
Guillermo Rauch 507e8c2ca4 Release 2.0.0-beta.26 2017-02-14 12:31:34 -03:00
Naoyuki Kanezawa 45e77d535f Fix status messages on error (#1131)
* fix status messages on error

* error: use the special message for 404
2017-02-14 16:15:42 +01:00
greenkeeper[bot] fb8f050667 fix(package): update glamor to version 2.20.23 (#1129)
https://greenkeeper.io/
2017-02-14 13:26:35 +01:00
greenkeeper[bot] 01213506ba fix(package): update babel-loader to version 6.3.0 (#1127)
https://greenkeeper.io/
2017-02-14 10:39:42 +01:00
greenkeeper[bot] cd894fb6e2 fix(package): update babel-core to version 6.23.1 (#1122)
https://greenkeeper.io/
2017-02-14 08:15:46 +05:30
Tim Neutkens 2f7cc9c33c Add webpack-bundle-analyzer example (#1110) 2017-02-14 07:54:50 +05:30
Arunoda Susiripala 9d529ea0b1 Remove babell-plugin-transform-react-constant-elements. (#1102)
* Remove babell-plugin-transform-react-constant-elements.
With this, our shared-modules example's counter won't work in
production mode. (as this plugin enabled)
So, we could see more issues like this.
That's why we don't need this at this time.

* Update package.json.
2017-02-14 07:37:34 +05:30
Tim Neutkens 77c14f96b1 Add react-jsx-source for development (#1115) 2017-02-14 07:24:01 +05:30
Tim Neutkens b0d1e7e3d1 Install peerDependencies in readme (#1116) 2017-02-14 07:22:31 +05:30
greenkeeper[bot] b39a32a126 fix(package): update babel-preset-react to version 6.23.0 (#1121)
https://greenkeeper.io/
2017-02-14 07:14:19 +05:30
greenkeeper[bot] 674e1c785d fix(package): update styled-jsx to version 0.5.5 (#1114)
https://greenkeeper.io/
2017-02-13 18:57:17 -03:00
nkzawa 60bfd00ccf Release 2.0.0-beta.25 2017-02-14 02:32:05 +09:00
Sébastien Dubois 75a993f781 Ensure NODE_ENV is production when deploying on Now (#1106)
* Ensure NODE_ENV is production when deploying on Now

* Fix custom server example instead of default one

* Fix typo
2017-02-13 16:09:11 +01:00
sfhardman dbc2ceefde Return a promise from getRequestHandler execution, await _serveStatic in serveStaticWithGzip, update custom-server-hapi to complete request lifecycle (#1099) 2017-02-12 23:12:32 -03:00
Arunoda Susiripala b220193167 Babelrc false babelrc (#1094)
* Detect babelrc disabling via babelrc.

* Simplify boolean condition.
2017-02-13 06:18:22 +09:00
Tim Neutkens a0453a7b84 Add tests for behaviour mentioned in #1079 (#1084) 2017-02-12 13:46:11 -03:00
Tim Neutkens 66d97744e9 Improve contributing text (#1093) 2017-02-12 13:45:39 -03:00
ǝlzlǝoq lǝᴉuɐp ツ e38d81e6c1 Fix patching component's render method in case its prototype is not writable (#1067) 2017-02-12 22:14:54 +05:30
Naoyuki Kanezawa 1cd242ba57 remove gulpfile.js (#1092) 2017-02-12 17:32:45 +01:00
Tim Neutkens 4fd2ca2598 Improve quiet documentation (#1085) 2017-02-13 01:26:51 +09:00
Tim Neutkens f93bacfaba Use minimist string option for hostname (#1090)
* Use minimist string option

* Consistently use --hostname

* Code style

* Show hostname
2017-02-13 01:23:42 +09:00
Jesse Hattabaugh c4a22abb4c adding hostname argument to CLI (#1017)
* adding hostname argument to CLI

* using -H instead of -hn

* removing hostname default

* checking that hostname has a truthy value that's not a boolean

* making the log message match the hostname

* oops
2017-02-12 12:26:10 +01:00
Davide Bertola 19f1125520 add global stylesheet example (#1016)
* add global stylesheet example

* fix avoiding html-escape of stylesheets

* update readme

* remove .gitignore
2017-02-12 00:22:35 +01:00
Tim Neutkens faef6e48e0 Remove pure-class-to-function (#1077)
* Optimize React

* Remove unused preset

* Remove pure-class-to-function
2017-02-11 07:42:12 +05:30
Tim Neutkens 250c066de5 Optimize React on next build (#1075)
* Optimize React

* Remove unused preset
2017-02-11 04:05:13 +09:00
Naoyuki Kanezawa ed00eb7236 ensure not to render ErrorDebug on production (#1064) 2017-02-10 10:05:22 +01:00
Luke Edwards 15facf0ae1 switch octal format (#1060) 2017-02-09 21:58:48 +01:00
Luke Edwards 864fe60a15 Write executable files to dist/bin (#1059)
* update to fly@2.0.4

* write executable dist/bin files
2017-02-09 21:37:18 +01:00
Luke Edwards 839fb1c05c [WIP] Migrate from Gulp to Fly (#965)
* install fly & plugins

* start flyfile conversion

* install node-notifier directly

* send task notifications

* upgrade to fly@2.0.1

* fix watch rebuilds

* compile in parallel

* remove gulp-related deps

* enable start|stop-chromedriver

* run build before watching

* extract webpack config

* fix webpack build

* use serial chain within 'build' -- faster

* update to fly-watch@1.1.0

* generate new yarn.lock after rebase

* rename tasks; use fly-esnext (async/await)

* bump fly deps (node4 supp)

* remove destructured assignment

* import latest package.json changes
2017-02-09 20:33:08 +01:00
I am not shine 97714e8b2a wrong position of babel config example (#1057) 2017-02-09 18:57:17 +01:00
Tim Neutkens c106a1d02f Using router example improvements (#1034) 2017-02-09 22:02:01 +05:30
Arunoda Susiripala 4534c55968 Set displayName properly when patching React locally. (#1053)
* Using styled-jsx for with-jest example.

* Set the displayName of the wraped components.
Otherwise it won't get the correct displayName if the
original component doesn't provide it by using it's function name.
2017-02-09 15:40:31 +01:00
nkzawa bfab00a3ee add react and react-dom to devDependencies again 2017-02-09 22:49:32 +09:00
Arunoda Susiripala 57b6e9a71b Using styled-jsx for with-jest example. (#1052) 2017-02-09 19:14:52 +05:30
Arunoda Susiripala 355c984ed8 Testing: use a better way to get a port to the test app (#753)
* Randomize the port returned from test util's findPort().

* Use http's server.listen() to bind to a random available port.

* Update yarn.lock

* Update yarn.lock
2017-02-09 14:40:09 +01:00
Tim Neutkens e46cedda57 Update table of contents (#1051) 2017-02-09 12:52:14 +01:00
Loren Sands-Ramshaw d6439d172b Add table of contents to README (#735)
* Fix example README formatting

* Add table of contents to README
2017-02-09 12:47:20 +01:00
Giacomo Rebonato b00f0c2044 TypeScript example proposal (#845)
* TypeScript example proposal

* removed unused loader

Removed typings

Moved TypeScript to dev dependencies

removed unused typings

changed react typings version

removed react dependency

set next dependency version to latest

removed not needed babel preset

enabled sourcemaps

simplified tsconfig

modified component to be a functional one

* Ignore build

* Making npm script Windows-friendly

* Clean up

* Added readme

* fixed typo
2017-02-09 12:36:58 +01:00
Tim Neutkens 53c245bf63 Throw when parsedUrl is not provided (#1015)
* Throw when parsedUrl is not provided

* Allow parsedUrl to be empty

* Remove unwanted line.

* Reset to the original
2017-02-09 08:52:48 +05:30
Arunoda Susiripala bdcb0f7828 Add support to transpile import/export syntax (#1044)
next/babel doesn't transpile import/export.
So, we need to do it explicitly, but only for test env.
2017-02-09 08:32:58 +05:30
Naoyuki Kanezawa 9348762f4a add next/error (#1040) 2017-02-08 16:59:33 -03:00
Naoyuki Kanezawa a9428b88e3 fix .baberc (#1041) 2017-02-08 20:44:56 +01:00
nkzawa 29e0c3eba0 add react and react-dom to devDependencies 2017-02-09 02:31:20 +09:00