doc.me 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. doc.me -- MakeMe file for GoAhead documentation
  3. */
  4. Me.load({
  5. targets: {
  6. api: {
  7. action: `
  8. apidoc('api/goahead.dox', '${SRC}/goahead.h', 'GoAhead')
  9. apiLayout('api/goahead.html', 'dist/ref/api/goahead.html')
  10. let base = me.dir.paks.join('*/doc')
  11. let files = Path().files(base.join('api/*.html'))
  12. for each (src in files) {
  13. let dest = src.trimComponents(base.components.length)
  14. apiLayout(src, Path('dist/ref').join(dest))
  15. }
  16. `
  17. },
  18. validate: {
  19. depends: [ 'gen-doc' ],
  20. action: `
  21. for each (f in Path('dist').files('**/*.html')) {
  22. let data = f.readString()
  23. data = data.replace('700|Open', '').
  24. replace(/goahead.download.html/g, 'download/goahead.html').
  25. replace(/pak.download.html/g, 'download/pak.html').
  26. replace(/developers.contributors.html/g, 'scripts/contributors.esp').
  27. replace(/nowrap="nowrap"/g, '').
  28. replace(/https:..embedthis.com.goahead.licensing.html/g, 'https://embedthis.com/').
  29. replace(/https:..embedthis.com.makeme.doc.guide.me.source.building.htm/g, 'https://embedthis.com/').
  30. replace(/https:..embedthis.com.makeme.doc.source.building.htm/g, 'https://embedthis.com/').
  31. replace(/https:..embedthis.com.makeme.doc.source/g, 'https://embedthis.com/').
  32. replace(/https:..embedthis.com.developers./g, 'https://embedthis.com/').
  33. replace(/nowrap/g, '')
  34. trace('Patch', f)
  35. f.write(data)
  36. }
  37. for each (f in Path('dist/man').files('*.html')) {
  38. f.write(f.readString().toLowerCase())
  39. }
  40. trace('Listen', 'expansive --nowatch')
  41. Cmd.run('expansive --nowatch')
  42. `
  43. },
  44. },
  45. })