Merge pull request #71 from sveltejs/0.15

[WIP] 0.15
This commit is contained in:
Rich Harris
2018-07-22 21:16:27 -04:00
committed by GitHub
5 changed files with 11 additions and 16 deletions

View File

@@ -1,26 +0,0 @@
<Nav path={props.path}/>
<main>
<svelte:component this={Page} {...props}/>
</main>
<style>
main {
position: relative;
max-width: 56em;
background-color: white;
padding: 2em;
margin: 0 auto;
box-sizing: border-box;
}
</style>
<script>
import Nav from '../components/Nav.html';
export default {
components: {
Nav
}
};
</script>

View File

@@ -1,9 +1,7 @@
import { init } from 'sapper/runtime.js';
import { routes } from './manifest/client.js';
import App from './App.html';
import { manifest } from './manifest/client.js';
init({
target: document.querySelector('#sapper'),
routes,
App
manifest
});

View File

@@ -2,14 +2,13 @@ import sirv from 'sirv';
import polka from 'polka';
import sapper from 'sapper';
import compression from 'compression';
import { routes } from './manifest/server.js';
import App from './App.html';
import { manifest } from './manifest/server.js';
polka() // You can also use Express
.use(
compression({ threshold: 0 }),
sirv('assets'),
sapper({ routes, App })
sapper({ manifest })
)
.listen(process.env.PORT)
.catch(err => {