update_docs.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. /* jshint node: true*/
  2. "use strict";
  3. var literate = require('ljs');
  4. var fs = require('fs');
  5. var docs2generate = [
  6. ['docs/canvaswrapper.md', 'jquery.canvaswrapper.js'],
  7. // ['docs/colorhelpers.md', 'jquery.colorhelpers.js'],
  8. ['docs/absRelTime.md', 'jquery.flot.absRelTime.js'],
  9. // ['docs/axislabels.md', 'jquery.flot.axislabels.js'],
  10. ['docs/browser.md', 'jquery.flot.browser.js'],
  11. ['docs/composeImages.md', 'jquery.flot.composeImages.js'],
  12. ['docs/drawSeries.md', 'jquery.flot.drawSeries.js'],
  13. ['docs/hover.md', 'jquery.flot.hover.js'],
  14. // ['docs/legend.md', 'jquery.flot.legend.js'],
  15. ['docs/logaxis.md', 'jquery.flot.logaxis.js'],
  16. ['docs/navigate.md', 'jquery.flot.navigate.js'],
  17. // ['docs/selection.md', 'jquery.flot.selection.js'],
  18. // ['docs/symbol.md', 'jquery.flot.symbol.js'],
  19. // ['docs/touch.md', 'jquery.flot.touch.js'],
  20. // ['docs/touchNavigate.md', 'jquery.flot.touchNavigate.js'],
  21. // ['docs/uiConstants.md', 'jquery.flot.uiConstants.js']
  22. ];
  23. docs2generate.forEach(function (doc) {
  24. console.log(doc[0], '...');
  25. var documentation = literate(doc[1], {
  26. code: false
  27. });
  28. fs.writeFileSync(doc[0], documentation);
  29. });