refactor(cli): clean up cli

This commit is contained in:
Sam Tolmay 2020-10-27 10:59:14 +02:00
parent 34dba01724
commit 758a6b9f31
5 changed files with 5 additions and 3 deletions

View File

@ -17,7 +17,6 @@
import path from 'path';
import getBuildScript from './getBuildScript';
import getLowdefyVersion from '../../utils/getLowdefyVersion';
import errorBoundary from '../../utils/errorBoundary';
import createPrint from '../../utils/print';
async function build(program) {
@ -36,4 +35,4 @@ async function build(program) {
});
}
export default errorBoundary(build);
export default build;

View File

@ -17,6 +17,7 @@
import program from 'commander';
import packageJson from '../package.json';
import build from './commands/build/build.js';
import errorHandler from './utils/errorHandler';
const { description, version } = packageJson;
@ -30,6 +31,6 @@ program
'--base-directory <base-directory>',
'Change base directory. Default is the current working directory.'
)
.action(build);
.action(errorHandler(build));
program.parse(process.argv);

View File

@ -14,6 +14,8 @@
limitations under the License.
*/
/*global __webpack_share_scopes__, __webpack_init_sharing__, __non_webpack_require__*/
import path from 'path';
async function loadModule(dir, moduleName, remoteEntry = 'remoteEntry.js') {