You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
1.2 KiB

3 years ago
3 years ago
3 years ago
9 months ago
3 years ago
3 years ago
  1. define([
  2. '/api/config'
  3. ], function (ApiConfig) {
  4. var out = {
  5. // fix up locations so that relative urls work.
  6. baseUrl: window.location.pathname,
  7. paths: {
  8. // json plugin
  9. text: '/bower_components/requirejs-plugins/lib/text',
  10. json: '/bower_components/requirejs-plugins/src/json',
  11. // jquery declares itself as literally "jquery" so it cannot be pulled by path :(
  12. "jquery": "/bower_components/jquery/dist/jquery.min",
  13. "mermaid": "/code/mermaid.min",
  14. // json.sortify same
  15. "json.sortify": "/bower_components/json.sortify/dist/JSON.sortify",
  16. //"pdfjs-dist/build/pdf": "/bower_components/pdfjs-dist/build/pdf",
  17. //"pdfjs-dist/build/pdf.worker": "/bower_components/pdfjs-dist/build/pdf.worker"
  18. cm: '/bower_components/codemirror'
  19. },
  20. map: {
  21. '*': {
  22. 'css': '/bower_components/require-css/css.js',
  23. 'less': '/common/RequireLess.js',
  24. }
  25. }
  26. };
  27. Object.keys(ApiConfig.requireConf).forEach(function (k) { out[k] = ApiConfig.requireConf[k]; });
  28. return function () {
  29. return JSON.parse(JSON.stringify(out));
  30. };
  31. });