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

21 lines
791 B
JavaScript

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);