UNPKG

446 BJavaScriptView Raw
1const webpack = require('webpack');
2const mock = require('ksc-mocker');
3const globby = require('globby');
4const chalk = require('chalk');
5module.exports = function (program) {
6 const files = globby.sync(program.files);
7 if (files.length <= 0) {
8 return () => {
9 };
10 }
11 const options = {
12 host: program.host,
13 port: program.port,
14 src: program.files,
15 watch: true
16 };
17 mock(options);
18};