Skip to content

Commit dae6d6c

Browse files
tidy up
1 parent 59d5a6e commit dae6d6c

File tree

6 files changed

+123
-769
lines changed

6 files changed

+123
-769
lines changed

bin/norch

+9-6
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
#!/usr/bin/env node
22

3-
const norch = require('../src/main.js')
4-
const { Command } = require('commander')
3+
import { Norch } from '../src/Norch.js'
4+
import { Command } from 'commander'
5+
import { readFileSync } from 'fs'
56

67
const program = new Command()
78

9+
const version = JSON.parse(readFileSync('package.json', 'utf8')).version
10+
811
program
9-
.version(require('../package.json').version)
12+
.version(version)
1013
.option('-p, --port <port>', 'specify the port', Number, 3030)
1114
.option(
12-
'-i, --index <index>',
13-
'specify the location of the index',
15+
'-n, --name <name>',
16+
'specify the name/location of the index',
1417
String,
1518
'norch-data'
1619
)
1720
.parse(process.argv)
1821

19-
norch(program.opts())
22+
const n = new Norch(program.opts())

bin/norch2

-22
This file was deleted.

0 commit comments

Comments
 (0)