ext.js 562 B

12345678910111213141516171819202122
  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. isInstallable: false,
  12. async check () {
  13. try {
  14. await cmdExists('pandoc')
  15. this.isInstalled = true
  16. } catch (err) {
  17. this.isInstalled = false
  18. }
  19. return this.isInstalled
  20. }
  21. }