'use strict';
import shell from 'shelljs';
import config from './../config';
import fs from 'fs';
// Build Command
//--------------
exports.command = 'build';
exports.desc = 'Build all assets for the speaker deck.';
exports.handler = argv => {
  const pkg = JSON.parse(fs.readFileSync(`${config.STARTER_REPOSITORY_NAME}/package.json`, 'utf8'));
  shell.exec(pkg.scripts.build);
};

@@ -48,53 +48,94 @@
 rt c
-onfig from './../config';%0Aimport fs from 'fs'
+halk from 'chalk';%0Aimport config from './../config';%0Aconst errorStyle = chalk.bold.red
 ;%0A//
@@ -284,50 +284,17 @@
 %7B%0A  
-const pkg = JSON.parse(fs.readFileSync(%60$%7B
+shell.cd(
 conf
@@ -323,37 +323,17 @@
 NAME
-%7D/package.json%60, 'utf8')
 );%0A  
+if (
 shel
@@ -343,27 +343,116 @@
 xec(
-pkg.scripts.build);
+'npm run build').code !== 0) %7B%0A    console.error(errorStyle('Error: Build failed.'));%0A    shell.exit(1);%0A  %7D
 %0A%7D;%0A

Fix command.