remove all hard-coded locations (#181)

This commit is contained in:
Rich Harris
2018-03-11 13:43:11 -04:00
parent bdc248f09a
commit 1d71b86c0f
3 changed files with 17 additions and 15 deletions

View File

@@ -95,12 +95,12 @@ export async function dev(opts: { port: number }) {
const hot_update_server = create_hot_update_server(dev_port);
watch_files('routes/**/*', ['add', 'unlink'], () => {
watch_files(`${locations.routes()}/**/*`, ['add', 'unlink'], () => {
const routes = create_routes();
create_main_manifests({ routes, dev_port });
});
watch_files('app/template.html', ['change'], () => {
watch_files(`${locations.app()}/template.html`, ['change'], () => {
hot_update_server.send({
action: 'reload'
});