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

715 commits

Author SHA1 Message Date
Naoyuki Kanezawa a87ef1a7af Incorporate styled-jsx (#420)
* integrate styled-jsx

* define styles of pages with styled-jsx

* bump styled-jsx

* bump styled-jsx

* error-debug: fix style

* bump styled-jsx

* fix examples to use styled-jsx

* bump styled-jsx
2016-12-19 10:42:19 -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
Arunoda Susiripala 36abdc77c5 Prefetch pages with Service Workers (#375)
* Register the service worker.

* Update prefetcher code to do prefetching.

* Implement the core prefetching API.
support "import <Link>, { prefetch } from 'next/prefetch'"

* Implement a better communication system with the service worker.

* Add a separate example for prefetching

* Fix some typos.

* Initiate service worker support even prefetching is not used.
This is pretty important since initiating will reset the cache.
If we don't do this, it's possible to have old cached resources
after the user decided to remove all of the prefetching logic.
In this case, even the page didn't prefetch it'll use the
previously cached pages. That because of there might be a already running
service worker.

* Use url module to get pathname.

* Move prefetcher code to the client from pages
Now we also do a webpack build for the prefetcher code.

* Add prefetching docs to the README.md

* Fix some typo.

* Register service worker only if asked to prefetch
We also clean the cache always, even we initialize
the service worker or not.
2016-12-15 11:13:40 -08:00
Arunoda Susiripala 65c4e1e5bd Init next.js even after dom is loaded. (#326)
Earlier we add a event to init next.js when dom has loaded.
But if at that time dom is already loaded, next.js won't get init ever.
Now we are using domready NPM module which handle these for us.
2016-12-02 22:59:10 +09:00
Arunoda Susiripala fcd59adea1 Add support for webpack's CommonsChunkPlugin and remove next bundle (#301)
* Add example app which demonstrate the problem.

* Add the first working version.

* Fix lint issues.

* Add README.md

* Use /_next/main.js as the main file URI

* Add the support for loading the core next bundle.

* Optimize the output by removing Next modules from pages.

* Use the same package.json as master use.

* Change the example repo's README for simpler instructions.

* Change example projects package.json to support next build and start.

* Change main.js into commons.js.

* Add support for hot core reload and errors.

* Introduce require based on eval-script.

* Add error reporting support with hot reloading.

* Update README.md
2016-11-28 09:15:56 +09:00
nkzawa 4ea933725d example: add missing dependencies and babel config 2016-10-29 22:20:29 +09:00
Tryggvi Gylfason 9ad0e57e6e Update readme.md (#128) 2016-10-28 16:58:41 +09:00
nkzawa 9a78dd8d1c fix jest example styles 2016-10-26 19:28:41 +09:00
Pavithra Kodmad 95719c956e Adds jest configuration npm run test shows failed results (#60) 2016-10-26 19:17:02 +09:00
nkzawa 83400a8f38 fix usage of next/css 2016-10-25 17:16:54 +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
Dan Zajdband 1477734211 Added linting using standard (#27)
* Added linting using standard

* Linting on test
2016-10-16 17:00:17 -07:00
Guillermo Rauch 89089f5546 add some basic examples 2016-10-15 23:31:05 -05:00