mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-12 03:05:12 +00:00
* 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
10 lines
505 B
TypeScript
10 lines
505 B
TypeScript
import * as path from 'path';
|
|
|
|
export const dev = () => process.env.NODE_ENV !== 'production';
|
|
|
|
export const locations = {
|
|
base: () => path.resolve(process.env.SAPPER_BASE || ''),
|
|
app: () => path.resolve(process.env.SAPPER_BASE || '', process.env.SAPPER_APP || 'app'),
|
|
routes: () => path.resolve(process.env.SAPPER_BASE || '', process.env.SAPPER_ROUTES || 'routes'),
|
|
dest: () => path.resolve(process.env.SAPPER_BASE || '', process.env.SAPPER_DEST || `.sapper/${dev() ? 'dev' : 'prod'}`)
|
|
}; |