@jayfong/x-server 2.56.1 → 2.57.1

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.
@@ -48,9 +48,11 @@ _yargs.default.command('dev', '开始开发', _ => _.positional('index', {
48
48
  });
49
49
  }
50
50
  await _template_util.TemplateUtil.init(process.cwd());
51
+ const xsignoreFile = _path.default.join(process.cwd(), '.xsignore');
52
+ const xsignoreContent = (await _fsExtra.default.pathExists(xsignoreFile)) ? (await _fsExtra.default.readFile(xsignoreFile, 'utf-8')).trim().split(/[\r\n]+/g).filter(v => v && !v.startsWith('#')) : [];
51
53
  const watcher = _chokidar.default.watch(['src', '.env', '.env.*'], {
52
54
  cwd: process.cwd(),
53
- ignored: '**/*.test.*'
55
+ ignored: ['**/*.test.*', ...xsignoreContent]
54
56
  });
55
57
  watcher.on('all', (0, _vtils.debounce)(async () => {
56
58
  await _env_util.EnvUtil.importFile({
@@ -78,7 +80,7 @@ _yargs.default.command('dev', '开始开发', _ => _.positional('index', {
78
80
  console.log('==== 启动服务中 ====');
79
81
  run();
80
82
  }
81
- }, 6));
83
+ }, 30));
82
84
  }).command('build', '构建', _ => _.positional('external', {
83
85
  alias: 'e',
84
86
  describe: '不应该被打的包',
package/lib/cli/cli.js CHANGED
@@ -45,9 +45,11 @@ yargs.command('dev', '开始开发', _ => _.positional('index', {
45
45
  });
46
46
  }
47
47
  await TemplateUtil.init(process.cwd());
48
+ const xsignoreFile = path.join(process.cwd(), '.xsignore');
49
+ const xsignoreContent = (await fs.pathExists(xsignoreFile)) ? (await fs.readFile(xsignoreFile, 'utf-8')).trim().split(/[\r\n]+/g).filter(v => v && !v.startsWith('#')) : [];
48
50
  const watcher = chokidar.watch(['src', '.env', '.env.*'], {
49
51
  cwd: process.cwd(),
50
- ignored: '**/*.test.*'
52
+ ignored: ['**/*.test.*', ...xsignoreContent]
51
53
  });
52
54
  watcher.on('all', debounce(async () => {
53
55
  await EnvUtil.importFile({
@@ -75,7 +77,7 @@ yargs.command('dev', '开始开发', _ => _.positional('index', {
75
77
  console.log('==== 启动服务中 ====');
76
78
  run();
77
79
  }
78
- }, 6));
80
+ }, 30));
79
81
  }).command('build', '构建', _ => _.positional('external', {
80
82
  alias: 'e',
81
83
  describe: '不应该被打的包',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jayfong/x-server",
3
- "version": "2.56.1",
3
+ "version": "2.57.1",
4
4
  "license": "ISC",
5
5
  "sideEffects": false,
6
6
  "main": "lib/_cjs/index.js",