ext.js 538 B

123456789101112131415161718192021
  1. const cmdExists = require('command-exists')
  2. const os = require('os')
  3. module.exports = {
  4. key: 'pandoc',
  5. title: 'Pandoc',
  6. description: 'Convert between markup formats. Required for converting from other formats such as MediaWiki, AsciiDoc, Textile and other wikis.',
  7. async isCompatible () {
  8. return os.arch() === 'x64'
  9. },
  10. isInstalled: false,
  11. async check () {
  12. try {
  13. await cmdExists('pandoc')
  14. this.isInstalled = true
  15. } catch (err) {
  16. this.isInstalled = false
  17. }
  18. return this.isInstalled
  19. }
  20. }