mdts 0.6.0 → 0.7.0
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.
- package/dist/cli.js +3 -0
- package/dist/frontend/bundle.js +1028 -115
- package/dist/server/routes/filetree.js +8 -8
- package/dist/server/routes/outline.js +22 -22
- package/dist/server/server.js +3 -69
- package/dist/server/watcher.js +136 -0
- package/package.json +4 -3
package/dist/cli.js
CHANGED
|
@@ -16,7 +16,10 @@ class CLI {
|
|
|
16
16
|
return this.requireOpen()
|
|
17
17
|
.then((open) => {
|
|
18
18
|
const program = new commander_1.Command();
|
|
19
|
+
const packageJsonPath = path_1.default.join(__dirname, '..', 'package.json');
|
|
20
|
+
const packageJson = JSON.parse((0, fs_1.readFileSync)(packageJsonPath, 'utf8'));
|
|
19
21
|
program
|
|
22
|
+
.version(packageJson.version)
|
|
20
23
|
.option('-p, --port <port>', 'Port to serve on', String(DEFAULT_PORT))
|
|
21
24
|
.argument('[directory]', 'Directory to serve', DEFAULT_DIRECTORY)
|
|
22
25
|
.action((directory, options) => {
|