1
0
mirror of https://github.com/jdan/98.css.git synced 2025-01-17 20:58:32 +01:00
98.css/server.js
2020-04-25 20:05:47 -04:00

17 lines
411 B
JavaScript

const chokidar = require("chokidar");
const build = require("./build");
chokidar
.watch(["style.css", "build.js", "docs", "fonts", "icon"], {
usePolling: true,
})
.on("change", (file) => {
console.log(
`[${new Date().toLocaleTimeString()}] ${file} changed -- rebuilding...`
);
build();
});
var liveServer = require("live-server");
liveServer.start({ port: 3000, root: "dist" });