@s-ui/bundler 8.0.0-beta.4 → 8.0.0-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -39,9 +39,13 @@ program
39
39
  })
40
40
  .parse(process.argv)
41
41
 
42
- const {clean = false, context} = program
42
+ const {
43
+ clean = false,
44
+ context,
45
+ linkPackage: packagesToLink = []
46
+ } = program.opts()
47
+
43
48
  config.context = context || config.context
44
- const packagesToLink = program.linkPackage || []
45
49
 
46
50
  const nextConfig = packagesToLink.length
47
51
  ? linkLoaderConfigBuilder({
@@ -59,13 +59,14 @@ if (!module.parent) {
59
59
  })
60
60
  .parse(process.argv)
61
61
 
62
- const {context} = program
62
+ const {context} = program.opts()
63
+
63
64
  webpackConfig.context = context || webpackConfig.context
64
65
  }
65
66
 
66
67
  const start = async ({
67
68
  config = webpackConfig,
68
- packagesToLink = program.linkPackage || []
69
+ packagesToLink = program.opts().linkPackage || []
69
70
  } = {}) => {
70
71
  clearConsole()
71
72
  // Warn and crash if required files are missing
@@ -85,7 +86,7 @@ const start = async ({
85
86
  const urls = prepareUrls(protocol, HOST, port)
86
87
  const nextConfig = linkLoaderConfigBuilder({
87
88
  config,
88
- linkAll: program.linkAll,
89
+ linkAll: program.opts().linkAll,
89
90
  packagesToLink
90
91
  })
91
92
  const compiler = createCompiler(nextConfig, urls)
@@ -35,7 +35,7 @@ const {
35
35
  path: publicPath,
36
36
  args: [entry],
37
37
  root = false
38
- } = program
38
+ } = program.opts()
39
39
 
40
40
  if (!output) {
41
41
  showError(new Error('--output is mandatory.'), program)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@s-ui/bundler",
3
- "version": "8.0.0-beta.4",
3
+ "version": "8.0.0-beta.5",
4
4
  "description": "Config-free bundler for ES6 React apps.",
5
5
  "bin": {
6
6
  "sui-bundler": "./bin/sui-bundler.js"