1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-02-13 19:42:36 +02:00
joplin/CliClient/app/command-version.js

22 lines
448 B
JavaScript
Raw Permalink Normal View History

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