mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-12 03:05:12 +00:00
Better/faster exporting
* add --build and --build-dir options to sapper export (#325) * tweak export logging, update port-authority to prevent timeout bug * better logging of export progress * handle case where linked resource is already fetched * default to .sapper/dev instead of .sapper * handle query params and redirects * dont write server_info.json either - second half of #318 * update changelog * update lockfile * try to track down ci test failures * err wut * curiouser and curiouser * ok, seems to work now
This commit is contained in:
@@ -9,6 +9,7 @@ import format_messages from 'webpack-format-messages';
|
||||
import { locations } from '../config';
|
||||
import { EventEmitter } from 'events';
|
||||
import { create_routes, create_main_manifests, create_compilers, create_serviceworker_manifest } from '../core';
|
||||
import Deferred from './utils/Deferred';
|
||||
import * as events from './interfaces';
|
||||
|
||||
export function dev(opts) {
|
||||
@@ -168,8 +169,6 @@ class Watcher extends EventEmitter {
|
||||
},
|
||||
|
||||
result: info => {
|
||||
fs.writeFileSync(path.join(dest, 'server_info.json'), JSON.stringify(info, null, ' '));
|
||||
|
||||
this.deferreds.client.promise.then(() => {
|
||||
const restart = () => {
|
||||
log = '';
|
||||
@@ -400,19 +399,6 @@ function mungeWebpackError(message: string, duplicate: boolean) {
|
||||
};
|
||||
}
|
||||
|
||||
class Deferred {
|
||||
promise: Promise<any>;
|
||||
fulfil: (value?: any) => void;
|
||||
reject: (error: Error) => void;
|
||||
|
||||
constructor() {
|
||||
this.promise = new Promise((fulfil, reject) => {
|
||||
this.fulfil = fulfil;
|
||||
this.reject = reject;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
const INTERVAL = 10000;
|
||||
|
||||
class DevServer {
|
||||
|
||||
Reference in New Issue
Block a user