joplin/CliClient/app/command-version.js

22 lines
430 B
JavaScript
Raw Normal View History

2017-07-10 20:03:46 +00:00
import { BaseCommand } from './base-command.js';
2017-07-10 23:17:03 +00:00
import { Setting } from 'lib/models/setting.js'
import { _ } from 'lib/locale.js';
2017-07-10 20:03:46 +00:00
class Command extends BaseCommand {
usage() {
return 'version';
}
description() {
return 'Displays version information';
}
2017-07-10 23:17:03 +00:00
async action(args) {
const p = require('./package.json');
this.log(_('%s %s (%s)', p.name, p.version, Setting.value('env')));
2017-07-10 20:03:46 +00:00
}
}
module.exports = Command;