1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | const tslib_1 = require("tslib");
|
4 | const yargs_1 = tslib_1.__importDefault(require("yargs"));
|
5 | const index_1 = require("./index");
|
6 | const argv = yargs_1.default(process.argv.slice(2))
|
7 | .usage("Usage: $0 [options]")
|
8 | .example("webpack-browser-sync", "")
|
9 | .options({
|
10 | config: {
|
11 | description: "path to webpack.config",
|
12 | alias: "c",
|
13 | default: "./webpack.config.js",
|
14 | required: true,
|
15 | },
|
16 | webpack: {
|
17 | description: "enable webpack",
|
18 | type: "boolean",
|
19 | default: true,
|
20 | },
|
21 | index: {
|
22 | description: "index.html relative path from webpackConfig.output.path",
|
23 | type: "string",
|
24 | default: "index.html",
|
25 | },
|
26 | hot: {
|
27 | description: "enable hot module replacement [need enabled webpack]",
|
28 | type: "boolean",
|
29 | },
|
30 | proxy: {
|
31 | description: "use proxy for remote debug",
|
32 | type: "string",
|
33 | },
|
34 | compress: {
|
35 | description: "enable gzip",
|
36 | type: "boolean",
|
37 | },
|
38 | historyApiFallback: {
|
39 | description: "enable history api fallback",
|
40 | type: "boolean",
|
41 | },
|
42 | })
|
43 | .help("help")
|
44 | .alias("help", "h")
|
45 | .showHelpOnFail(false, "whoops, something went wrong! run with --help")
|
46 | .argv;
|
47 | index_1.create(argv);
|