1
0
mirror of https://github.com/stolksdorf/homebrewery.git synced 2025-12-20 21:51:30 +00:00
Files
homebrewery/scripts/dev.js
2017-03-26 12:20:17 -04:00

21 lines
840 B
JavaScript

const label = 'dev';
console.time(label);
const jsx = require('vitreum/steps/jsx.watch.js');
const less = require('vitreum/steps/less.watch.js');
const assets = require('vitreum/steps/assets.watch.js');
const server = require('vitreum/steps/server.watch.js');
const livereload = require('vitreum/steps/livereload.js');
const Proj = require('./project.json');
Promise.resolve()
.then(()=>jsx('homebrew', './client/homebrew/homebrew.jsx', Proj.libs, './shared'))
.then((deps)=>less('homebrew', './shared', deps))
.then(()=>jsx('admin', './client/admin/admin.jsx', Proj.libs, './shared'))
.then((deps)=>less('admin', './shared', deps))
.then(()=>assets(Proj.assets, ['./shared', './client']))
.then(()=>livereload())
.then(()=>server('./server.js', ['server']))
.then(()=>console.timeEnd.bind(console, label))
.catch(console.error)