mirror of
https://github.com/lowdefy/lowdefy.git
synced 2025-01-06 13:15:24 +08:00
refactor(cli): clean up cli
This commit is contained in:
parent
34dba01724
commit
758a6b9f31
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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') {
|
||||
|
Loading…
Reference in New Issue
Block a user