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

142 commits

Author SHA1 Message Date
Tim Neutkens f8f90955c5 Add prefetch to propTypes + flow typings (#1295) 2017-02-27 10:50:28 +05:30
Tim Neutkens 408633c1dc Remove traces of glamor (#1286)
* Remove traces of glamor

As talked about with @rauchg. Glamor takes up around 60KB of the bundle (pre-gzip). Since styled-jsx is the way to go now and we support adding glamor by the user we should remove it as dependency cause it is bundled even when not used.

Added rehydration to the example, since we did that in our code.

There is only one thing I'm not sure about and want to discuss:
what should we do with next/css. Right now I added a throw for when it is imported. I'm not sure if we should do that / some other way to notify the user it has been removed. The reasoning behind the throw is that when we would do a console.warn the user would see 'css.default.<X>' not found because we don't have the glamor dependency anymore.

* Update yarn.lock

* Remove test for styles
2017-02-26 17:58:00 +05:30
Sébastien Dubois 6ede206d82 update link prefetch syntax in examples (#1276) 2017-02-25 15:54:42 +01:00
Eric Ferraiuolo e24db68f8b Add example app with React Intl (#1055)
* Add example app with React Intl

Fixes #1022

* Update examples/with-react-intl/package.json to be consistent
2017-02-24 22:45:18 +01:00
Tim Neutkens 9ba7a10f85 Fix linting errors (#1235) 2017-02-21 21:52:44 +01:00
Fabien Le Frapper 22c22efc35 Fix missing dependencies (#1232)
Tried to pull & run this example, it failed, complaining about missing react & react-dom dependencies
2017-02-21 16:40:18 +01:00
Davide Bertola d4b018e91f add ‘with-refnux’ example (#1215) 2017-02-20 20:13:05 -08:00
Tim Neutkens e5844314e3 Fix linting errors (#1197) 2017-02-18 20:12:19 +01:00
胡子大哈 bdd5b9ef3d Add note for next-connect-redux #1193 (#1203) 2017-02-18 19:39:34 +01:00
Guillermo Rauch 47e5231cdd Revert "Use the original idea of provider wrapper for redux example (#1201)"
This reverts commit ba54c6ac3d.
2017-02-18 14:11:54 -03:00
胡子大哈 ba54c6ac3d Use the original idea of provider wrapper for redux example (#1201)
Use the original idea of provider wrapper from #1193 and remove
unnecessary `initStore` in every page.
2017-02-18 14:03:02 -03:00
Kirill Konshin f0cb5b71a0 Added next-redux-wrapper to example (#1196)
* Added next-redux-wrapper to example

* Docs, renamed withRedux
2017-02-18 01:10:27 -03:00
Tim Neutkens 00590d7181 Remove babelrc for preact example (#1194) 2017-02-17 20:03:02 -03:00
Thomas Lindstrøm 6e5d57dae9 Add example with-scoped-stylesheets-and-postcss (#1146)
* Add example `with-external-stylesheets-and-postcss`

* 🔥 Remove extra semi-colon

* 📝 Attribute `with-global-stylesheet`

* Force a new test

* 📝 Update README.md

* Rename `external` -> `scoped`
2017-02-17 16:04:58 +01:00
Dan Zajdband e33a7dbc25 Now that we have react-dom as a peerDependency this import issue was fixed (#1183) 2017-02-16 19:44:43 -03:00
Tim Neutkens ff547752f0 Fix HMR issue with webpack-stats-analyzer (#1149)
* Use stats.json instead of running server

* Add suggested changes
2017-02-15 21:42:48 +09:00
Giuseppe db97fbffad Fix with-styled-jsx-postcss example (#1147) 2017-02-15 11:57:15 +01:00
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
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
Tim Neutkens 2f7cc9c33c Add webpack-bundle-analyzer example (#1110) 2017-02-14 07:54:50 +05:30
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
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 c106a1d02f Using router example improvements (#1034) 2017-02-09 22:02:01 +05:30
Arunoda Susiripala 57b6e9a71b Using styled-jsx for with-jest example. (#1052) 2017-02-09 19:14:52 +05:30
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
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
Lukas Strassel 4a73ccbb00 add react and react dom as peer (#1024)
- tackles #997
- add ./idea to gitignore for webstorm users
- update all the examples
2017-02-08 10:11:38 +05:30
Adam Soffer 01cc898450 Update Apollo example (#1021)
* Add minimal apollo example

* Update apollo example README

* Update apollo example demo link in README

* Fix button styles

* Fix show more button

* Alias demo url

* Include the data field on the Apollo store when hydrating

* Revert

* Include the data field on the Apollo store when hydrating per tpreusse's suggestion.

* Add example to faq section in README

* Sort by newest; Add active state to buttons

* Make optimization suggestions

* Use process.browser; inline props

* Pass wrapped component's initial props into component heirarchy if they exist

* Remove unnecessary sorting of array

* Update Apollo example

* Remove trailing comma

* Update reduxRootKey

* Remove unnecessary babelrc
2017-02-07 12:02:28 +01:00
Emanuel Kluge f6510c05b2 Pass parsed request-URL into the run-method (#1000) 2017-02-05 12:38:20 -03:00
Sergio Daniel Xalambrí 592c666e82 [example] Progressive rendered application (#998)
* [add] example of a progressive rendered app

* [update] remove extra blank line

* [update] fix typo

* [update] more use cases

* [update] example link

* Update README.md

* [update] next.js dependency version

* [update] fix readme typos
2017-02-05 13:43:28 +01:00
Koutaro Chikuba 267b74b256 Add next.js flowtype definition to with-flow example (#973)
* Add next.js flowtype definition to with-flow

* Add render api types for flow

* Add prefetch types

* Fix push/replace api types to promise
2017-02-05 19:39:51 +09:00
Tim Neutkens a8731d0651 Added universal configuration example (#991)
* Added universal configuration example

* Make example more clear
2017-02-05 04:43:23 +05:30
Arunoda Susiripala 57e9a5e5f6 Find custom babel config location properly. (#969)
* Find custom babel config location properly.
Earlier we simply check for the .bablerc file in the dir.
But the actual logic is much complex.
Now we are using the babel's actual logic to find the
custom config location.

* Fix failing tests.
2017-02-03 14:33:35 +09:00
Vlad Frolov fca0a39cbc examples/with-react-md: Fixed "Cannot read property 'focus' of undefined" (#961) 2017-02-02 22:56:07 +01:00
Tim Neutkens 61bdae5a08 Fix typo in react-md example readme (#959) 2017-02-02 20:00:45 +01:00
Vlad Frolov 0a2466a36e Added React-MD example (#940) 2017-02-02 13:10:59 +01:00
Tim Neutkens 59281adef3 Allow parsed url to be passed down (#950)
* Allow parsed url to be passed down

* Update example to reflect url passing

* Check if passed url.query is empty

* Rename url to parsedUrl
2017-02-02 12:21:08 +05:30
Tim Neutkens 0820204646 Remove yarn.lock from examples (#912)
* Remove yarn.lock from examples

* Add yarn.lock to gitignore for examples

* Move yarn ignore to examples directory
2017-01-29 05:48:53 +05:30
Sébastien Dubois a3bec7666b with-apollo: Don't store Redux store and Apollo client in global namespace (#909)
* Add yarn lockfile

* Avoid storing Redux store and Apollo client in global namespace + don't create Apollo client when already existing in browser
2017-01-28 17:22:32 +01:00
Stephen Mathieson ee717af088 examples/with-redux: remove global store (#908)
This patch removes the global `store` on the client. IMO this example
should avoid polluting the global namespace with simple scoping tricks
can solve the problem equally as well.
2017-01-27 18:33:42 -08:00
Adam Soffer 8310f812ec Fix Apollo Example (#900)
* Add minimal apollo example

* Update apollo example README

* Update apollo example demo link in README

* Fix button styles

* Fix show more button

* Alias demo url

* Include the data field on the Apollo store when hydrating

* Revert

* Include the data field on the Apollo store when hydrating per tpreusse's suggestion.

* Add example to faq section in README

* Sort by newest; Add active state to buttons

* Make optimization suggestions

* Use process.browser; inline props

* Pass wrapped component's initial props into component heirarchy if they exist

* Remove unnecessary sorting of array
2017-01-27 17:06:17 +01:00
jcsmesquita 8922e7b63a Update README.md (#895)
Just adding download instructions
2017-01-26 23:19:12 +05:30
Adam Soffer a76ec83b64 Update Apollo Example (#888)
* Add minimal apollo example

* Update apollo example README

* Update apollo example demo link in README

* Fix button styles

* Fix show more button

* Alias demo url

* Include the data field on the Apollo store when hydrating

* Revert

* Include the data field on the Apollo store when hydrating per tpreusse's suggestion.

* Add example to faq section in README

* Sort by newest; Add active state to buttons

* Make optimization suggestions

* Use process.browser; inline props

* Pass wrapped component's initial props into component heirarchy if they exist
2017-01-25 17:10:21 -08:00
Dan Zajdband 3ad3a6c1e7 Added Google AMP example (#793)
* Added Google AMP example

* Added styles and a second page

* Using regular anchor since there is no client-side routing

* Added comment on react config for amp
2017-01-24 05:20:56 -08:00
jagreehal cbb2d1c250 simpler flow task (#857) 2017-01-23 22:19:14 -08:00
Robin Frischmann 8d8d5ebdf6 Example using Fela (#863)
* added example using fela

* update package-json

* removed nested routing test

* fixed linting issues

* fixed typo
2017-01-23 20:29:15 -03:00
Adam Soffer 4b257483e2 Add Apollo example (#780)
* Add minimal apollo example

* Update apollo example README

* Update apollo example demo link in README

* Fix button styles

* Fix show more button

* Alias demo url

* Include the data field on the Apollo store when hydrating

* Revert

* Include the data field on the Apollo store when hydrating per tpreusse's suggestion.

* Add example to faq section in README

* Sort by newest; Add active state to buttons

* Make optimization suggestions

* Use process.browser; inline props
2017-01-22 13:27:06 +01:00
Kristo Jorgenson e67d62d888 Update styled-component docs (#841)
* Add details to custom Document documentation

Custom document must be created at ./Pages/_document.js, which is not
noted in the README… so I updated it.

* Add note to styled-components example about existing issue

* Made phrasing a bit more clear

* Another phrasing update.

* from P to p
2017-01-21 22:24:17 +01:00