Add liveServer

This commit is contained in:
Tom Raithel
2017-02-10 20:00:37 +01:00
parent d331e97ba8
commit 70ce2feefb
2 changed files with 8 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
import { watch } from 'fs';
import { exec } from 'child_process';
import liveServer from 'live-server';
import {
stylesPath,
@@ -8,6 +9,7 @@ import {
radarPath,
staticPath,
templatesPath,
distPath,
} from './file';
const watchBuild = (name) => (eventType, fileName) => {
@@ -32,4 +34,8 @@ watch(radarPath(), options, watchBuild('pages'));
watch(staticPath(), options, watchBuild('pages'));
watch(templatesPath(), options, watchBuild('pages'));
console.log('Watching for changes, press CTRL+C to quit');
var params = {
root: distPath(),
logLevel: 2, // 0 = errors only, 1 = some, 2 = lots
};
liveServer.start(params);