如何调试`figwheel-sidecar`项目?

时间:2017-05-18 12:32:54

标签: clojurescript figwheel

如何使用我的Emacs在我自己的机器上运行figwheel-sidecar项目,以便我可以调试它?

我尝试cider-jack-in,它有效,但如何让clojurescript项目取决于它并让Emacs运行本地版本的figwheel-sidecar

1 个答案:

答案 0 :(得分:1)

https://github.com/bhauman/lein-figwheel/wiki/Using-the-Figwheel-REPL-within-NRepl#integration-with-emacscider

关键步骤

$array = [
 [
   "role" => "admin",
   "name" => [
     "Felipy",
     "Ivan",
   ]
 ],
 [
   "role" => "user",
   "name" => [
      "Michel",
      "Paul",
      "Tay"
   ]
 ]
];

$result = array_reduce($array, function($carry, $key) {
    foreach ($key['name'] as $name)
        $carry[$name] = $key['role'];
    return $carry;
}, []);

var_dump($result);

;; ~/.emacs.el or ~/.emacs.d/init.el (require 'cider) (setq cider-cljs-lein-repl "(do (require 'figwheel-sidecar.repl-api) (figwheel-sidecar.repl-api/start-figwheel!) (figwheel-sidecar.repl-api/cljs-repl))")