@autobest-ui/scripts 3.0.0-alpha.4 → 3.0.0-alpha.6

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.
@@ -32,14 +32,12 @@ function build() {
32
32
 
33
33
  build()
34
34
  .then(
35
- ([clientInfo, serverInfo]) => {
36
- if (clientInfo.warnings.length || serverInfo.warnings.length) {
35
+ buildInfo => {
36
+ if (buildInfo.warnings.length) {
37
37
  // eslint-disable-next-line no-console
38
38
  console.log(chalk.yellow('Compiled with warnings.\n'));
39
39
  // eslint-disable-next-line no-console
40
- console.log(clientInfo.warnings.join('\n\n'));
41
- // eslint-disable-next-line no-console
42
- console.log(serverInfo.warnings.join('\n\n'));
40
+ console.log(buildInfo.warnings.join('\n\n'));
43
41
  // eslint-disable-next-line no-console
44
42
  console.log(`\nSearch for the ${chalk.underline(chalk.yellow('keywords'))} to learn more about each warning.`);
45
43
  // eslint-disable-next-line no-console
@@ -34,7 +34,7 @@ nodemon(options)
34
34
  // 启动时的事件
35
35
  // eslint-disable-next-line no-console
36
36
  console.log('Server app has started');
37
- if (!isOpened) {
37
+ if (startOpenPath && !isOpened) {
38
38
  setTimeout(() => {
39
39
  open(`http://localhost:${PORT}${startOpenPath}`);
40
40
  }, 3000);
package/bin/ssr.js CHANGED
@@ -9,7 +9,7 @@ const spawn = require('cross-spawn');
9
9
 
10
10
  const args = process.argv.slice(2);
11
11
 
12
- const scriptIndex = args.findIndex(x => x === 'build' || x === 'start' || 'server');
12
+ const scriptIndex = args.findIndex(x => x === 'build' || x === 'start' || x === 'server');
13
13
  const script = scriptIndex === -1 ? args[0] : args[scriptIndex];
14
14
  const nodeArgs = scriptIndex > 0 ? args.slice(0, scriptIndex) : [];
15
15
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autobest-ui/scripts",
3
- "version": "3.0.0-alpha.4",
3
+ "version": "3.0.0-alpha.6",
4
4
  "private": false,
5
5
  "description": "utils for project tools",
6
6
  "bin": {