create API for exporting

This commit is contained in:
Rich Harris
2018-05-22 11:57:24 -04:00
parent 4f49fd8d5c
commit 0dbf75f100
3 changed files with 156 additions and 99 deletions

View File

@@ -5,14 +5,12 @@ import { locations } from '../config';
export function build() {
return new Promise((fulfil, reject) => {
try {
console.log('1');
const emitter = _build({
dest: locations.dest(),
app: locations.app(),
routes: locations.routes(),
webpack: 'webpack'
});
console.log('2', emitter);
emitter.on('build', event => {
console.log(colors.inverse(`\nbuilt ${event.type}`));