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

110 commits

Author SHA1 Message Date
Tim Neutkens b1c4f3aec4
Monorepo (#5341)
- Implements Lerna
- Moves all source code into `packages/next`
- Keeps integration tests in the root directory
2018-10-01 01:02:10 +02:00
Shu Ding ae805a0bcf Improve README.md (#5331)
- `<details>` and `<ul>` cannot be inside `<p>` and it will not be parsed correctly by the MDX tokenizer.
- `sh` is not a valid language name for syntax highlighting libs (e.g. [highlight.js](https://github.com/highlightjs/highlight.js/tree/master/src/languages)).
2018-09-29 16:16:49 +02:00
Tim Neutkens 8fb6f7d5b6 Use new import syntax in readme examples 2018-09-29 11:41:03 +02:00
Iago Bruno b68b705446 Just some simple improvements in formatting codes in documentation (#5250)
I think it looks better for new people in JavaScript/React (and for my perfectionism 😄).
2018-09-22 14:13:27 +02:00
Tim Neutkens a8a97b07c7
Provide a way to copy files in exportPathMap (#5089)
Related #4659 

Adds the possibility for users to copy files inside of `exportPathMap`. This allows for adding `robots.txt` `sitemap.xml` etc. another use case is for https://github.com/hanford/next-offline, currently it's manually reading the buildId in `exportPathMap`.

To allow users to do this we'll introduce a new parameter holding an object with the following keys:

- `dev` - `true` when `exportPathMap` is being called in development. `false` when running `next export`. In development `exportPathMap` is used to define routes and behavior like copying files is not required.
- `dir` - Absolute path to the project directory
- `outDir` - Absolute path to the `out` directory (configurable with `-o` or `--outdir`). When `dev` is `true` the value of `outDir` will be `null`.
- `distDir` - Absolute path to the `.next` directory (configurable using the `distDir` config key)
- `buildId` - The buildId the export is running for

Example usage:

```js
// next.config.js
const fs = require('fs')
const {join} = require('path')
const {promisify} = require('util')
const copyFile = promisify(fs.copyFile)

module.exports = {
  exportPathMap: async function (defaultPathMap, {dev, dir, outDir, distDir, buildId}) {
    if(dev) {
      return defaultPathMap
    }
    // This will copy robots.txt from your project root into the out directory
    await copyFile(join(dir, 'robots.txt'), join(outDir, 'robots.txt'))
    return defaultPathMap
  }
}
```
2018-09-04 16:01:50 +02:00
Tim Neutkens 6c1389b69e
Add mention of canary vs stable (#5074) 2018-09-03 00:13:22 +02:00
HaNdTriX a4defaa9de Document global Promise polyfill (#5006)
Depends on: https://github.com/zeit/next.js/pull/4988
2018-08-22 17:21:16 +02:00
Leo Lamprecht e4a94acd96 Moved to ZEIT's AppVeyor (#4991)
Previously, it was mistakenly located under @arunoda's personal account.
2018-08-20 11:52:00 +02:00
Leo Lamprecht 70f02ea8af
Lowercased text files 2017-02-16 23:54:22 +01:00
Fabien Le Frapper 561087fa04 Fix typo in a href example (#1168) 2017-02-16 01:35:25 +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
Tim Neutkens 2c85b367ce Add notice about getInitialProps (#1140)
* Add notice about getInitialProps

* Remove extra whitespace
2017-02-15 08:28:13 +05:30
Tim Neutkens b0d1e7e3d1 Install peerDependencies in readme (#1116) 2017-02-14 07:22:31 +05:30
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
Tim Neutkens 4fd2ca2598 Improve quiet documentation (#1085) 2017-02-13 01:26:51 +09:00
I am not shine 97714e8b2a wrong position of babel config example (#1057) 2017-02-09 18:57:17 +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
Tim Neutkens 8c1808d7d7 Add contributing.md (#1009)
* Add contributing.md

* Only reload example app on server changes
2017-02-06 18:49:34 +05:30
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 579098663c Set dev variable consistent with examples (#939) 2017-01-31 19:48:10 +05:30
Stephen Mathieson ac2a963c9c README: fix "Routing with lazy component loading" blob (#915)
Looks like `<Link>` was replaced with `\n` on accident
2017-01-29 06:29:29 +05:30
Jarmo Isotalo 0b131cad2a Add next build and next start to the first How to use sample (#894) 2017-01-26 22:30:55 +05:30
Robin Frischmann a418b35e98 Added Fela Example to the CSS-in-JS <details> in README (#878) 2017-01-25 04:13:34 -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
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
Ryuichi Okumura 5be9c04007 Custom server example with Hapi in README (#825) 2017-01-19 14:22:21 +01:00
Dan Zajdband 2c2d961844 Added Koa example (#800)
* Added Koa example

* Linted koa example
2017-01-17 08:23:06 +01:00
张俊锋 606d89c9f5 Update README.md (#802)
fix quotation mark
2017-01-16 20:26:23 -08:00
Dan Zajdband e28f80cd99 Updated <Link> in repo, always wrapping an anchor. (#798) 2017-01-16 22:27:55 +01:00
Mike Bannister 789edb87b7 Fix typo in README (#787) 2017-01-16 02:41:46 -08:00
Guillermo Rauch 4fcc551fb4 adding @timneutkens 2017-01-10 12:55:48 -08:00
Alex Moldovan 07f717061f Added layout component example (#560)
* added layout component example

* coding style fixes

* trailing spaces removed

* updated README file

* added layout example in docs

* moved .babelrc so that it handles all projects from the examples folder
2017-01-05 13:03:36 -08:00
Ovidiu Cherecheș 741500c603 Warn about webpack loaders (#638) 2017-01-03 10:06:55 -08:00
Arana Jhonny 1d700d0240 Aphrodite example. (#634)
* add aphrodite example

* fix props

* Update README.md
2017-01-03 10:06:04 -08:00
Arana Jhonny 856978918e Add cxs example. (#613)
* add cxs example

* fix example location
2017-01-01 22:35:14 -08:00
Guillermo Rauch 5ab71d16b1 Update README.md 2016-12-30 17:37:06 -08:00
Arunoda Susiripala c890dc3573 Implement Router Events (#511)
* Move route loading logic to a common place.

* Add router events.

* Add EventEmitter's core API methods.

* Add example app for loading events and docs.

* Fix some typos.

* Get rid of Router.ready()

* Remove events package.
It's already shipping with webpack.

* Handling aborting properly.

* Expose simple attribute based events listener API.
Removed the proposed event listener API from the public API.

* Remove error logged when there's an abort error.
There are many other ways to capture this error.
So, it doesn't look nice to print this always.

* Change router events to pass only the current URL as arguments.

* Add a section about Cancelled Routes to README.
2016-12-30 17:15:22 -08:00
Tim Neutkens 030a1ed6a9 Clean up docs about next/babel (#557)
* Clean up docs about next/babel

* Add suggestions from #553
2016-12-29 10:58:28 -03:00
Guillermo Rauch d022cd9f24 Update README.md 2016-12-26 15:14:27 -08:00
Arunoda Susiripala ac2a71876d Add support for using .babelrc in the app root. (#493)
* Add support for using .babelrc in the app root.

* Update the README about the .babelrc usage.

* Fix a typo.

* Remove additional example usage.
2016-12-26 10:13:45 -08:00
Guillermo Rauch e81852c742 Update README.md 2016-12-24 09:57:15 -08:00
James O'Dwyer 200f8eecb2 Add warning about module.exports use (#505)
* add warning about module.exports to readme

* rm unnecessary react imports
2016-12-24 09:53:08 +05:30
Dan Zajdband d3cf72cd4f Update README.md (#499) 2016-12-24 10:36:34 +09:00
Arunoda Susiripala fb3612a941 Add SSR caching example to the README. (#503) 2016-12-24 10:30:06 +09:00
Dan Zajdband 01e1883f79 Added glamor example and pointing warning to css migration guide (#500) 2016-12-23 11:18:25 -08:00
Naoyuki Kanezawa 01da6f4761 Add styletron example (#486)
* add styletron example

* example: fix link

* example: improve README

* Added styletron example reference to readme and merge with master
2016-12-23 08:01:24 -05:00
Dan Zajdband f6ece560e4 Add/data fetch example (#485)
* Added data fetch example

* Finished updating examples install instructions and added data-fetch example to main readme
2016-12-23 08:05:49 +09:00
Guillermo Rauch 27dedc9d6e Update README.md 2016-12-22 13:08:58 -08:00