sable 0.5.12 → 0.5.13

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.
Files changed (2) hide show
  1. package/bin/sable +6 -3
  2. package/package.json +4 -4
package/bin/sable CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  const console = require('console');
3
- const program = require('commander');
3
+ const {Command} = require('commander');
4
4
  const {startServer} = require('..');
5
5
  const packageJSON = require('../package.json');
6
6
 
7
- program
7
+ const program = new Command()
8
8
  .version(packageJSON.version)
9
9
  .description('Starts a HTTP server for development')
10
10
  .usage('[options] <documentRoot ...>')
@@ -18,7 +18,10 @@ if (program.noWatch) {
18
18
  program.watch = false;
19
19
  }
20
20
 
21
- startServer(program)
21
+ startServer({
22
+ ...program.opts(),
23
+ documentRoot: 0 < program.args.length ? program.args : [process.cwd()],
24
+ })
22
25
  .catch((error) => {
23
26
  console.error(error);
24
27
  process.exit(1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sable",
3
- "version": "0.5.12",
3
+ "version": "0.5.13",
4
4
  "description": "Starts a server and a file watcher",
5
5
  "author": {
6
6
  "name": "Kei Ito",
@@ -24,12 +24,12 @@
24
24
  "build": "tsc --project tsconfig.build.json",
25
25
  "test": "ava",
26
26
  "version": "run-s version:changelog version:add",
27
- "version:changelog": "nlib-changelog --output CHANGELOG.md",
27
+ "version:changelog": "npx @nlib/changelog --output CHANGELOG.md",
28
28
  "version:add": "git add ."
29
29
  },
30
30
  "dependencies": {
31
- "commander": "8.1.0",
31
+ "commander": "8.3.0",
32
32
  "connect": "3.7.0",
33
- "middleware-static-livereload": "1.2.20"
33
+ "middleware-static-livereload": "1.2.21"
34
34
  }
35
35
  }