const label = 'build'; console.time(label); const clean = require('vitreum/steps/clean.js'); const jsx = require('vitreum/steps/jsx.js'); const lib = require('vitreum/steps/libs.js'); const less = require('vitreum/steps/less.js'); const asset = require('vitreum/steps/assets.js'); const Proj = require('./project.json'); Promise.resolve() .then(()=>clean()) .then(()=>lib(Proj.libs)) .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(()=>asset(Proj.assets, ['./shared', './client'])) .then(()=>console.timeEnd.bind(console, label)) .catch(console.error);