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.
This commit is contained in:
freedmand
2018-01-05 14:16:30 -08:00
parent ee94f355d5
commit 30ddb3dd7e
6 changed files with 770 additions and 46 deletions

View File

@@ -5,4 +5,7 @@ const cmd = process.argv[2];
if (cmd === 'build') {
process.env.NODE_ENV = 'production';
require('../lib/build.js')();
}
} else if (cmd === 'extract') {
process.env.NODE_ENV = 'production';
require('../lib/utils/extract.js')();
}