ext.mjs 555 B

12345678910111213141516171819202122
  1. import cmdExists from 'command-exists'
  2. import os from 'node:os'
  3. export default {
  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. }