mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-17 05:04:55 +00:00
move config into single file, add errors to help people migrate
This commit is contained in:
@@ -30,7 +30,18 @@ export function create_serviceworker_manifest({ manifest_data, client_files }: {
|
||||
manifest_data: ManifestData;
|
||||
client_files: string[];
|
||||
}) {
|
||||
const files = glob('**', { cwd: locations.static(), filesOnly: true });
|
||||
let files;
|
||||
|
||||
// TODO remove in a future version
|
||||
if (fs.existsSync(locations.static())) {
|
||||
files = glob('**', { cwd: locations.static(), filesOnly: true });
|
||||
} else {
|
||||
if (fs.existsSync('assets')) {
|
||||
throw new Error(`As of Sapper 0.21, the assets/ directory should become static/`);
|
||||
}
|
||||
|
||||
files = [];
|
||||
}
|
||||
|
||||
let code = `
|
||||
// This file is generated by Sapper — do not edit it!
|
||||
|
||||
Reference in New Issue
Block a user