25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 
 
 

30 satır
631 B

  1. let path = require("path");
  2. let { get_app_path, app_list } = require("./utils");
  3. let node_modules_path = path.resolve(
  4. get_app_path("frappe"),
  5. "..",
  6. "node_modules"
  7. );
  8. let app_paths = app_list
  9. .map(get_app_path)
  10. .map(app_path => path.resolve(app_path, ".."));
  11. module.exports = {
  12. includePaths: [node_modules_path, ...app_paths],
  13. importer: function(url) {
  14. if (url.startsWith("~")) {
  15. // strip ~ so that it can resolve from node_modules
  16. url = url.slice(1);
  17. }
  18. if (url.endsWith(".css")) {
  19. // strip .css from end of path
  20. url = url.slice(0, -4);
  21. }
  22. // normal file, let it go
  23. return {
  24. file: url
  25. };
  26. }
  27. };