Sam Hatchett
71cfdd2907
fixes api route default content-type
...
fixes issue where api routes were being defaulted to text/html. Page routes should be text/html, but api routes could be json, zip files, etc., and express does some type-guessing to assist in case the user code does not specify the content-type.
2018-01-31 11:08:25 -05:00
Rich Harris
4590aa313c
Merge pull request #96 from mrkishi/master
...
Identify js and html route clashes
2018-01-20 18:36:50 -05:00
Rich Harris
c15959710b
huh. not sure where this broke
2018-01-20 13:39:49 -05:00
Rich Harris
e6fcafe09b
Merge pull request #95 from lukeed/fix/express-reliance
...
Remove Express Helpers
2018-01-20 12:10:43 -05:00
Rich Harris
75e70207b8
return service worker from generate_asset_cache - fixes #90
2018-01-20 12:02:32 -05:00
mrkishi
8a8526d9ed
Identify js and html route clashes
2018-01-20 01:42:13 -02:00
Luke Edwards
f4e46e6e6c
replace Express shorthands w/ native counterparts
2018-01-19 13:54:55 -08:00
Rich Harris
96666d05ec
only write to filesystem in dev mode
2018-01-16 08:47:44 -05:00
Rich Harris
0e131cc81e
Merge pull request #88 from sveltejs/gh-9
...
Exporting
2018-01-15 10:24:35 -05:00
Rich Harris
b7bb69925e
rename extract to export, for familiarity to next.js devs
2018-01-15 10:03:27 -05:00
Rich Harris
73d491cd19
Merge branch 'master' into lazy-chokidar
2018-01-15 09:58:03 -05:00
Rich Harris
e25fceb4b8
node 6 is the new IE
2018-01-15 09:36:12 -05:00
Rich Harris
a523ba58ff
save pages as index.html, ignore hashes
2018-01-14 22:45:51 -05:00
Rich Harris
89c430a0cb
slightly different approach to extracting
2018-01-14 18:19:51 -05:00
Rich Harris
8ef312849c
always write service-worker.js and shell index.html file
2018-01-14 18:16:10 -05:00
Rich Harris
4200446684
ignore trailing slash in pathnames
2018-01-14 18:15:40 -05:00
Rich Harris
2af2ab3cb9
Ensure output dir exists, return Promise
2018-01-14 13:45:47 -05:00
Rich Harris
6a4dc1901c
Enforce prod mode, return a Promise so it can be used programmatically
2018-01-14 13:45:01 -05:00
Rich Harris
33b6450e34
Merge branch 'master' into master
2018-01-14 12:16:09 -05:00
Rich Harris
8faa98af6a
-> v0.4.0
2018-01-14 12:07:06 -05:00
Rich Harris
44285cdb2f
serialized preloaded data and send to client as initial payload - fixes #3
2018-01-14 11:22:00 -05:00
Rich Harris
c4b4bd587d
use %sapper.scripts%
2018-01-14 10:45:21 -05:00
Rich Harris
40d16852f7
prevent unnecessary promise chains, and hoist handler function
2018-01-14 00:01:10 -05:00
Rich Harris
727a76ebb5
fall through to 404 if no handler exists for method
2018-01-13 23:29:41 -05:00
Emil Tholin
81b5e0d764
Handle DELETE requests with del export
2018-01-10 19:24:22 +01:00
freedmand
9ea4137b87
Add option to extract server-side routes at directories other than /api.
...
Also clarifies some texts and documentation.
2018-01-05 19:21:25 -08:00
freedmand
7588911108
Removes all async/await from the extraction pipeline, and adds unit tests for extracted client pages that match a regular expression
2018-01-05 14:56:58 -08:00
freedmand
fc8280adea
Fixes small issue with reading chunk files
2018-01-05 14:42:04 -08:00
Emil Tholin
2b3472b1b1
Remove async/await from lib
2018-01-05 23:19:40 +01:00
freedmand
30ddb3dd7e
Adds a sapper extract CLI command, which scrapes the server to run as a static website starting at the site's root.
...
TESTED=Basic unit test ensuring relevant routes are added.
2018-01-05 14:16:30 -08:00
Luke Edwards
0c891ba79e
require chokidar lazily; dev-mode only
2018-01-05 00:39:17 -08:00
Rich Harris
a7024b3806
fix index route
2017-12-31 16:04:54 -05:00
Rich Harris
423e02aeae
handle nested routes - fixes #55
2017-12-31 13:25:52 -05:00
Rich Harris
b66f624f01
pass server request object to preload
2017-12-30 17:31:07 -05:00
Rich Harris
c29e8022cc
replace all occurences of variables
2017-12-25 16:18:19 -05:00
Rich Harris
0226bd90c6
dont write service-worker.js and index.html to disk in prod mode
2017-12-23 15:01:29 -05:00
Rich Harris
db1c1f332a
Add goto function ( #46 )
...
* WIP
* programmatic navigation
* get tests working
* wait longer
2017-12-23 13:15:40 -05:00
Rich Harris
e8d510b261
dont use /tmp, it fails when now server wakes after a sleep
2017-12-23 12:27:51 -05:00
Rich Harris
f8e237b265
make invalidation message look less like an error
2017-12-23 10:55:55 -05:00
Rich Harris
68c2f2e388
linting
2017-12-22 09:19:32 -05:00
Rich Harris
0bcb61650b
use nightmare for testing
2017-12-21 16:48:53 -05:00
Rich Harris
f0feab5738
fix typo
2017-12-21 13:39:13 -05:00
Rich Harris
e9203b4d71
empty .sapper when building
2017-12-21 12:01:53 -05:00
Rich Harris
222a750b7b
render main.js back to templates, to allow relative imports - fixes #40
2017-12-21 11:38:03 -05:00
Rich Harris
1bed4b0670
use /, not path.sep, when creating routes
2017-12-21 08:46:40 -05:00
Rich Harris
f50d3c4262
error if routes clash - fixes #33
2017-12-20 20:46:28 -05:00
Rich Harris
a48afb77d3
stream responses - fixes #19
2017-12-20 18:39:39 -05:00
Rich Harris
492f024d2a
add preload header for main.js and current route - fixes #2
2017-12-20 18:04:11 -05:00
Rich Harris
4232f75b19
rebundle when main.js changes
2017-12-20 17:36:22 -05:00
Rich Harris
fefb0d96d7
rebundle when routes and templates change
2017-12-20 17:34:23 -05:00