Files
iD/server.js
Bryan Housel 5f9a9864d8 more changes to build scripts
- drop `build_src.js` and `build.js`
  - now we'll use rollup configs for all src building
- add `npm run build:css` and `npm run build:data`
- watcher now only watches for css file changes
  - src and data rebuilds are too slow to reasonably do "live"
- fix `build_css.js` and `build_data.js` to either exec or export
2020-01-22 12:21:36 -05:00

17 lines
459 B
JavaScript

/* eslint-disable no-console */
const colors = require('colors/safe');
const gaze = require('gaze');
const StaticServer = require('static-server');
const buildCSS = require('./build_css.js');
gaze(['css/**/*.css'], (err, watcher) => {
watcher.on('all', () => buildCSS());
});
const server = new StaticServer({ rootPath: __dirname, port: 8080, followSymlink: true });
server.start(() => {
console.log(colors.yellow('Listening on ' + server.port));
});