mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-13 03:25:24 +00:00
wip 3
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
import { build, export as exporter } from 'sapper/core.js';
|
||||
import { dest, dev, entry, src } from '../config.js';
|
||||
|
||||
const cmd = process.argv[2];
|
||||
const start = Date.now();
|
||||
|
||||
if (cmd === 'build') {
|
||||
build()
|
||||
build({ dest, dev, entry, src })
|
||||
.then(() => {
|
||||
const elapsed = Date.now() - start;
|
||||
console.error(`built in ${elapsed}ms`); // TODO beautify this, e.g. 'built in 4.7 seconds'
|
||||
@@ -15,8 +16,8 @@ if (cmd === 'build') {
|
||||
} else if (cmd === 'export') {
|
||||
const start = Date.now();
|
||||
|
||||
build()
|
||||
.then(() => exporter())
|
||||
build({ dest, dev, entry, src })
|
||||
.then(() => exporter({ src, dest }))
|
||||
.then(() => {
|
||||
const elapsed = Date.now() - start;
|
||||
console.error(`extracted in ${elapsed}ms`); // TODO beautify this, e.g. 'built in 4.7 seconds'
|
||||
|
||||
Reference in New Issue
Block a user