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

20 commits

Author SHA1 Message Date
Jacob Page 498f37e33f Support events emitter for router (#4726)
Fixes #4679 
* Document usage of `events` router property
* Expose `events` in the `router` context object
2018-07-05 14:41:18 +02:00
Luc e98a877ee4 Merge url query with exportPathMap (#4678)
This PR fixes #4615

From the issue :
> One thing we might consider is merging and showing a warning for keys not defined in exportPathMap

The behaviour after this PR is the following :

```js
// next.config.js
module.exports = {
  exportPathMap: () => ({
    '/': { page: '/', query: { a: 'blue' } }
  })
}
```

| url called | `ctx.query` | warning ? |
|-|-|-|
| `/` | `{ a: 'blue' }` | |
| `/?a=red` | `{ a: 'blue' }` | |
| `/?b=green` | `{ a: 'blue', b: 'green' }` | `... parameter 'b' missing in exportPathMap` |

Is that the expected behaviour ? If not, I'll update the PR to shape the expected behavior.
2018-06-28 08:37:57 +02:00
Tim Neutkens 15dde33794
Add build manifest (#4119)
* Add build manifest

* Split out css since they don’t have exact name

* Remove pages map

* Fix locations test

* Re-run tests

* Get consistent open ports

* Fix static tests

* Add comment about Cache-Control header
2018-04-12 09:47:42 +02:00
Tim Neutkens dac2f39a25 Add support for exportPathMap in development (#4094)
* Add support for exportPathMap in development

* Add comment about what it does
2018-04-05 07:18:11 +05:30
Tim Neutkens ebf0c47c25
Upgrade standard.js (#4064)
* Upgrade standard.js

# Conflicts:
#	yarn.lock

* Upgrade babel-eslint
2018-03-27 20:11:03 +02:00
Arunoda Susiripala 373661aafa Handle empty assetPrefix scenario properly. (#3667)
Also make sure to init assetPrefix in next/asset in
the context of next-export.
2018-02-03 17:12:01 +01:00
Arunoda Susiripala f6bd1df6aa
Fix canary tests on CIs (travis, appveyor) (#3375)
* Dump address.

* Use zero as the port.

* Limit test cases.

* throw address.

* Fail a specific error.

* Set a port manually.

* Make sure jest is working properly.

* Set the jest timeout time to 5 min.

* Run the actual test

* Run all production tests on Travis.

* Set the Jest default timeout to 5 min for all integration tests.

* Remove production only testing.

* Remove unwanted console.log

* Remove the addition number from test case

* Set the static export test jest timeout to 5 min.

* Run tests again if they failed once.
2017-12-03 08:12:12 +05:30
Jesse Ditson a79357f2a4 Allow use of filenames in exportPathMap (#2973)
* allow use of filenames in exportPathMap

* add link test and handling for file paths when flattening links for export

* add note about exporting file paths to readme.md
2017-10-05 20:33:10 +02:00
Arunoda Susiripala 8277d43190 Rewrite url when exporting only if there's a href. (#2316) 2017-06-20 14:07:36 +05:30
Arunoda Susiripala a36be58124 Rewrite urls with hashes correct for static export. (#2242)
* Rewrite urls with hashes correct for static export.

* Fix some lint issues inside an example app.
2017-06-13 11:44:31 +05:30
Arunoda Susiripala 92b0a690be Add a default value of '{}' to query in the export mode. (#2003) 2017-05-18 10:54:57 +05:30
Arunoda Susiripala eb4ef544ca Possible fix for dynamic import test in travis. 2017-05-15 10:43:22 +05:30
Arunoda Susiripala aeaccf441b Add dynamic-import support for next-export. 2017-05-15 10:03:35 +05:30
Arunoda Susiripala e613882010 Update tests for the recent changes. 2017-05-15 09:31:02 +05:30
Arunoda Susiripala d7048e13fa Add some test cases for nested pages with next export. 2017-05-11 09:09:31 -07:00
Arunoda Susiripala 880eb4caff Add a test case for client side routing for next export. 2017-05-11 08:52:28 -07:00
Arunoda Susiripala 14fa6f5893 Add browser tests for next-export 2017-05-09 18:54:08 -07:00
Arunoda Susiripala 56dc85485f Add ssr tests for next-export 2017-05-09 18:28:15 -07:00
Arunoda Susiripala 7b193f1aa7 Add basic test setup 2017-05-09 16:24:34 -07:00
Arunoda Susiripala e8ff53f519 Added the test app for static export. 2017-05-09 14:03:20 -07:00